Remove pages from site search results

Hello,

I’m creating an FAQ page for a website and dozens of blog posts are being created to answer each question in the FAQ. I would like to add an inline search bar at the top of the FAQ page to help filter through all the content. Is there a function script I can add to my child theme (or any other way) to have the inline search element only search posts and exclude all website pages from the search results?

Also, is it possible to change the wording on the “no search results found” page? I tried this code on my pro-child theme but it did not work: Change search page text - results not found

Thank you!

Hi @smartermethods,

Thank you for reaching out to us. There’s a Search Inline element in Cornerstone / Content Builder that you can use but this will search everything in your site, currently there’s no option to exclude pages from the search elements. You probably need to use a third party plugin to achieve your desired results.

Regretfully we cannot suggest any third party plugin due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script.

To change the “no content” text, please follow this thread: How to change the search result message, if nothing is found

Hope this helps!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.