• Just a quick question – I have a theme that I just wrote up, and it involves a custom query (using query_posts()) in the header to display random custom fields in the header.

    It works great on all pages – *except* search.php (my search results page). Instead, I get a huge MySQL database error.

    I’m wondering if this is common? I’ve noticed if I remove the custom query from the header, the search page displays fine – but I’d really like to keep it there. i thought that, because I’m using the new WP_query method (over just “query_posts()”) that the two loops wouldn’t affect each other, but apparently it is. So I was just wondering if this was common, and why it does this. Anyone know?

  • The topic ‘new WP-query() and search.php’ is closed to new replies.