How to Add Categories to H1 Search Results Title for Posts


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>

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