WordPress.org

Ready to get started?Download WordPress

Forums

Search.php not loading for custom post types (1 post)

  1. madegood
    Member
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic