• hi
    I installed this plugin a few months ago and I have a custom post type called Staff. When I installed the plugin it searched posts and staff without issue but now the default search is ignoring the staff post type. Its searching posts/pages just fine but ignoring the custom post type of staff.

    If I put in a hidden field:
    <input type=”hidden” name=”post_type” value=”staff”>
    it will search only staff (and brings the results back fine), if I try putting in “staff,post” it will only search posts.

    In the search index without Staff, theres 600 old records, with staff its 900+ so I know its indexing ok but for some reason its ignoring staff when it searches posts.
    Im not using a custom search page. Does anyone have any ideas what could cause this?

    cant figure it why it would suddenly refuse to load the custom post type alongside the posts.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter webfeat

    (@webfeat)

    I tried another search plugin, Better Search, which returned staff and posts just fine. However it doesnt let me use hidden fields to specify only staff in the staff section, so Im still stuck.

    Plugin Author Mikko Saari

    (@msaari)

    Try using

    <input type="hidden" name="post_types" value="staff,post" />

    as that’s probably going to work better than the post_type variable.

    Also, you can use

    <input type="hidden" name="post_types" value="any" />

    to return any post type.

    It may be your site is silently restricting the search to just posts. That happens sometimes with some themes.

    Thread Starter webfeat

    (@webfeat)

    Thanks, will give that a try.

    Its not the site thats the issue, from what I can tell, as your plugin was working fine for many months and if I try another search plugin it works fine. Something has changed but I have on idea where or why.

    Plugin Author Mikko Saari

    (@msaari)

    It would be a good idea to try to rule out other plugins; it’s possible some other plugin is affecting this somehow.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘custom post types not searched’ is closed to new replies.