[Resolved] 2 Questions re: Search Results – (1) Creating a Header and (2) Remove Pages

Home Forums Support [Resolved] 2 Questions re: Search Results – (1) Creating a Header and (2) Remove Pages

Home Forums Support 2 Questions re: Search Results – (1) Creating a Header and (2) Remove Pages

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #505580
    Suggie

    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!

    #505643
    Tom
    Lead Developer
    Lead Developer

    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 ๐Ÿ™‚

    #506183
    Suggie

    You guys are the best! Both worked perfectly! Thank you!

    #506533
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.