By default, the search results page displays only the name of the grouping that you are browsing by (e.g. a manufacturer, a department, a category group, etc.). For SEO purposes, you may want to add some content to that header to drive traffic to those product pages. You can do this by populating the Detailed Description field in the taxonomy item you want to optimize.
For example, to add content to the product category group "Rifles", go to Products > Taxonomy > Category Groups and click on the Rifles Category. Enter the HTML you want in the Detailed Description field.
You will need to do this for every product grouping that you want to optimize.
Then, go to Website > Pages > Pages, and find the Product Search Results page. In the Javascript tab, there should be a function called afterDisplaySearchResults. It should look something like this:
Make the following changes (highlighted in green):
The code is included below to copy and paste:
if (empty(pageGroupingData['description'])) { $('#category_banner').remove(); } else { if(empty(pageGroupingData['detailed_description'])) { $('#category_banner h1').html(pageGroupingData['description']); } else { $('#category_banner h1').replaceWith(pageGroupingData['detailed_description']); } if (empty(pageGroupingData['image_url'])) { $('#category_banner').find('img').remove(); $('#category_banner').removeClass('banner'); } else { $('#category_banner img').attr('src', pageGroupingData['image_url']); } }
After this change is done, you will see the detailed description in the header when browsing:
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article