WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to be able to search a particular custom post type on my blog. The custom post type is named: website_bookmarks

I have modified my search form with a hidden field

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

So on my search page in the URI I will see...


The problem is it ONLY shows search results for my regular blog post and no results from my custom post type.

It should not be showing any results for my blog post and ONLY results for my custom post type website_bookmarks

Can someone help me? I can not figure out why it will not work and it will work on other people blogs simply by changing the search form to what I did above.

share|improve this question
up vote 0 down vote accepted

Could you check one thing for me: http://codex.wordpress.org/Function_Reference/register_post_type

When you register website_bookmarks is:


(boolean) (importance) Whether to exclude posts with this post type from search results.

Set to false?

share|improve this answer
hello, thanks for reply, and yes I have that set to false and public, public_queryable,show_ui, query_var all set to true, it is a strange issue – JasonDavis Sep 26 '11 at 9:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.