WordPress.org

Ready to get started?Download WordPress

Forums

Problems with WP_Query (1 post)

  1. ericopter
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic