0
add_action('template_redirect', function () {
    global $wp_query;

    echo '<pre>';
    print_r($wp_query);
    echo '</pre>';
    die;
});
1
  • What does it show?
    – mukto90
    Commented May 26 at 10:31

1 Answer 1

0

For just print the query object put this in your function.php:

add_action('wp_footer', function () {
    global $wp_query;

    echo '<pre>';
    print_r($wp_query);
    echo '</pre>';
    die;
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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