Tagged: Custom Post Type, dude, search form, SearchWP
-
AuthorPosts
-
January 15, 2015 at 11:22 pm #380521
Hi,
Great Theme and Excellent support!!I would like to limit the search to only one custom post type. “Episode”
I am trying to modify the “searchform” and “search results” page. I tried using
<input type="hidden" name=post_type" value="episode" />
in the “searchform.php” file but it doesn’t work. I created a basic search form using html on a blank page and this code does work (it limited the search to only the “Episode” custom post type) so I know my custom post type is valid and the syntax on the code is correct.Ultimately I would love to add checkboxes under or above the search form that can allow the user to select “Episode” or “All Posts” or some other custom post types.
Any help is greatly appreciated!
January 16, 2015 at 6:53 pm #381003Hey Chris!
Please try using advanced search plugins such as SearchWP – implementation here – http://kriesi.at/documentation/enfold/use-searchwp-instead-of-the-standard-search/
or Relevanssi – implementation here – http://kriesi.at/documentation/enfold/use-relevanssi-in-search-instead-of-the-default-search/Cheers!
YigitJanuary 19, 2015 at 4:53 pm #381876Great recommendation!
I purchased SearchWP and created a supplemental search engine that only searches one custom-post-type.. Everything is working good. My default search on the homepage is still working correctly too.
To create this new search engine I had to create a new search-results-page template with a basic search-form at the top. I styled it to look similar to enfold’s.
One question though. Is there an easy way to make the SearchWP supplemental search engine output it’s search results to an enfold search-results template so it looks just like the default enfold search-results-page but still only searches for the custom-post-type? I still want to keep the default search engine on my homepage though so I don’t want to modify search.php. Same goes for the search-form. Can I use an enfold style search-form for this new supplemental search engine I created with SearchWP? I just want everything to look the same way.
I’ve tried a lot of things without success…I tried making an alternate search-form.php and search.php template that will use the SearchWP supplemental search engine but can’t get it right.
Thanks again!
ChrisThanks for recommending SearchWP! It’s exactly what I needed :)
January 20, 2015 at 8:40 pm #382646 -
AuthorPosts
- You must be logged in to reply to this topic.