• Resolved ebedgert

    (@ebedgert)


    I would like to have two different search boxes on my site:

    -a search box that searches ordinary (non-custom) posts only

    -a search box that searches posts of a particular custom post type only

    Can Relevanssi do this, or am I looking for a different plugin?

    https://wordpress.org/plugins/relevanssi/

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Yes, you can do that. Put this in the search form for the custom post search:

    <input type="hidden" name="post_type" value="custom_post_type_name" />

    and this in the search form for the other search:

    <input type="hidden" name="post_type" value="post" />

Viewing 1 replies (of 1 total)
  • The topic ‘Separate search for custom post types?’ is closed to new replies.