Problems with WP_Query
-
I am having a peculiar problem that I cant figure out and cant find through googling. I use some custom queries to add a “My Calendar” plugin, grab the latest post in a specific category and also display a contact form.
All is fine and dandy except for on the search results page (search.php). I call the function the same, but no output unless one of the posts I’m querying in my custom post matches the query.
Here is the code:
[Code moderated as per the Forum Rules. Please use the pastebin]
I have tried wp_reset_query(), wp_reset_postdata(), global $wp_query; unset($wp_query->query_vars[‘s’], etc etc.
Any help would be appreciated. It seems as though the “s” key/value is being passed to all my new query instances, but I dont know how that could be.
- The topic ‘Problems with WP_Query’ is closed to new replies.