Limit search to custom post type using hidden form fields
-
A new site I am developing features a custom post type in the form of a Document Library.
I want the main site search to remain (and be powered by relevanssi), but I would also like to be able to have a second search field on the Document Library page that would ONLY search the Document Library posts.
I see from the Relevanssi settings page that you can dynamically limit a search to particular tags & categories by adding the code <input type=’hidden’ name=’cats’ value=’list of cats and tags’ /> is there a similar method to limit a search to a particular post type?
Many thanks for any help in advance.
T
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Limit search to custom post type using hidden form fields’ is closed to new replies.