Article suggestions
  1. Home
  2. Section: My Content
  3. How to Add Categories to H1 Search Results Title for Posts

How to Add Categories to H1 Search Results Title for Posts

How to Add Categories to H1 Search Results Title for Posts
  • avatar
Written by Chan Nier
Updated on February 17, 2025

 Link: https://support.brilliantdirectories.com/support/solutions/articles/12000050248

If you wish to have your category show up in the H1 of your post search result, please follow along the steps below:

1. Go to Content - Edit Post Settings and select the feature you wish to add this to.

2. Click on the Search Results Tab.

3. Copy and paste the code below into the Default H1 field.

<span class=“inline-block”><?php echo (!empty($_GET['category']))? implode(', ', $_GET['category']): ''; ?></span>
PHP

This will also work when you search multiple categories at the same time:


Thank you for leaving a rating!
Did you find this article helpful?
0 out of 0 people found this article helpful so far
Can't find what you're looking for? Get in touch
How can we help?
Send your question below and we'll get back to you as soon as possible.
Cancel
translation missing: en.kb.default.contact_form_error
×
Thanks for your message!
Thanks for your message!
×