WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How To Get Query String (3 posts)

  1. luispunchy
    Member
    Posted 3 years ago #

    I am trying to debug my theme's code... and it would help if I could see the actual query string variables that are being passed from page to page.

    How do I see the query string? Is there a way I can have that printed onto the page... some php function? thanks!

  2. MichaelH
    Member
    Posted 3 years ago #

    Put that in your theme's Page Template

    <?php
    echo "<pre>"; print_r($wp_query->query_vars); echo "</pre>";
    ?>
  3. luispunchy
    Member
    Posted 3 years ago #

    Thanks, MichaelH - I knew you would know, just hoped you'd see and have time to reply :)

    ... now I have a bit more firepower for debugging this custom post type archive issue (and yes, that's my not-too-subtle attempt to elicit your help over there)

Topic Closed

This topic has been closed to new replies.

About this Topic