WordPress Code Snippets

A fresh mix of code snippets and tutorials

View all WP query variables

120

Micro Tip for the day: slice of PHP code for viewing all WordPress query variables. Very useful for figuring out custom loops and such.

Just add this in any theme template file, for example just before the WP Loop:

global $wp_query;
var_dump($wp_query->query_vars);

Update (2013/07/03): Related post! Check out View all WP Post variables to learn more.

More tuts + trix on the way :)

Learn more

WordPress Themes In Depth


Show Support

Like our new Facebook Page to show support!