WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't find documentation regarding this - but is there a way to see how a query might bounce around from one filter to another? I've got a list of possible wp_filters and their relevance but I can't determine what's happening to a query I'm making.

Here's the basics - I'm attempting to use the Relevanssi plugin with WooCommerce and the Vintage theme, searching through custom fields. I can see that the query is returning correctly before it's being displayed; just before it's displayed all the posts are removed.

share|improve this question

Well you can try and run debug_backtrace(); on your function.

For example:

function wpse_82183_debug( $query ) {
    //your query goes here, this is just a basic one
    if ( $query->is_home() && $query->is_main_query() ) {
         $query->set( 'posts_per_page', 1 );

        //magic happens here
add_action( 'pre_get_posts', 'wpse_82183_debug' );

There are also a number of plugins that help figure stuff out,

I recently made this list: http://wycks.github.com/WordPress-Gear/ (click debug tools)

Have a look at :

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.