Skip to content

Instantly share code, notes, and snippets.

@dcavins
Last active January 5, 2016 18:05
Show Gist options
  • Save dcavins/f5f12c006900d1a52ecd to your computer and use it in GitHub Desktop.
Save dcavins/f5f12c006900d1a52ecd to your computer and use it in GitHub Desktop.
Dump the $WP_Query args out to the page for BP Docs queries
// We use the priority of 30 because bp_docs_access_protection kicks in at priority 28.
add_action( 'pre_get_posts', 'troubleshoot_parent_doc_dropdown', 30 );
function troubleshoot_parent_doc_dropdown( $wp_query ) {
if ( $wp_query->query['post_type'] == bp_docs_get_post_type_name() ) {
echo '<pre>'; var_dump( $wp_query->query_vars ); echo '</pre>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment