Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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
        var_dump(debug_backtrace());
    }
}
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

 
discard

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.