Support » Fixing WordPress » Search.php not loading for custom post types

  • Hi,

    I have a custom search template on my site and under some circumstances it works perfectly;

    search working well

    However i have another search form on another part of the site which search for custom post types. In this instance, search.php does not load and it reverts to index.php.

    displaying correct results, but not using the right template

    Now I know there are potentially a couple of variables here, but I’m preeeety sure search.php only loads when custom post type is NOT requested.

    If you think it would help then I could upload the contents of my search.php, but I feel that’s not necessary because it isn’t even being called. My feeling is this is a template hierarchy issue, but I don’t know how to solve it.

    Any help greatly appreciated, I’ve spent ages on this already!

  • The topic ‘Search.php not loading for custom post types’ is closed to new replies.