Archived topic
2 Questions re: Search Results - (1) Creating a Header and (2) Remove Pages
3 replies · Started by Suggie on February 25, 2018
Hi there.
In the search results page, default shows as "Search results for: <search term>.
(1) Is there a way that I can put that same language/output using Page Header add-on? (I'm hoping for something as simple as it was to add {{post_title}} or {{post_author}} into a header with a background image. Ultimately, I want to have a specific image in the background of the "Search results for: <search term> area. (Going for consistency with category/tag/archive results pages, all of which are using headers made with Page Headers add-on).
(2) Search results are currently pulling both posts and pages. Possible to limit the results to just posts?
Thank you!
Hi there,
1. You can create a shortcode which you can use in the Page Header: https://generatepress.com/forums/topic/page-header-for-search-results/#post-403642
2. This should help: http://www.wpbeginner.com/wp-tutorials/how-to-limit-search-results-for-specific-post-types-in-wordpress/
Let me know :)
You guys are the best! Both worked perfectly! Thank you!
You're welcome :)