Created
July 9, 2013 00:13
-
-
Save nicjohnson/5953612 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<pre><code><?php print_r($wp_query) ?></code></pre> | |
<?php if ( have_posts() ) : ?> | |
<ul class="unstyled stacked"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<li><a class="" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> | |
<?php endwhile; ?> | |
</ul> | |
</div> | |
<?php else : ?> | |
<p>nope</p> | |
<?php endif; ?> | |
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WP_Query Object | |
( | |
[query] => Array | |
( | |
[category_name] => unitary-gas-heating | |
) | |
[query_vars] => Array | |
( | |
[category_name] => unitary-gas-heating | |
[error] => | |
[m] => 0 | |
[p] => 0 | |
[post_parent] => | |
[subpost] => | |
[subpost_id] => | |
[attachment] => | |
[attachment_id] => 0 | |
[name] => | |
[static] => | |
[pagename] => | |
[page_id] => 0 | |
[second] => | |
[minute] => | |
[hour] => | |
[day] => 0 | |
[monthnum] => 0 | |
[year] => 0 | |
[w] => 0 | |
[tag] => | |
[cat] => 2 | |
[tag_id] => | |
[author_name] => | |
[feed] => | |
[tb] => | |
[paged] => 0 | |
[comments_popup] => | |
[meta_key] => | |
[meta_value] => | |
[preview] => | |
[s] => | |
[sentence] => | |
[fields] => | |
[menu_order] => | |
[category__in] => Array | |
( | |
) | |
[category__not_in] => Array | |
( | |
) | |
[category__and] => Array | |
( | |
) | |
[post__in] => Array | |
( | |
) | |
[post__not_in] => Array | |
( | |
) | |
[tag__in] => Array | |
( | |
) | |
[tag__not_in] => Array | |
( | |
) | |
[tag__and] => Array | |
( | |
) | |
[tag_slug__in] => Array | |
( | |
) | |
[tag_slug__and] => Array | |
( | |
) | |
[ignore_sticky_posts] => | |
[suppress_filters] => | |
[cache_results] => 1 | |
[update_post_term_cache] => 1 | |
[update_post_meta_cache] => 1 | |
[post_type] => | |
[posts_per_page] => 10 | |
[nopaging] => | |
[comments_per_page] => 50 | |
[no_found_rows] => | |
[order] => DESC | |
) | |
[tax_query] => WP_Tax_Query Object | |
( | |
[queries] => Array | |
( | |
[0] => Array | |
( | |
[taxonomy] => category | |
[terms] => Array | |
( | |
[0] => unitary-gas-heating | |
) | |
[include_children] => 1 | |
[field] => slug | |
[operator] => IN | |
) | |
) | |
[relation] => AND | |
) | |
[meta_query] => WP_Meta_Query Object | |
( | |
[queries] => Array | |
( | |
) | |
[relation] => | |
) | |
[queried_object] => stdClass Object | |
( | |
[term_id] => 2 | |
[name] => Unitary Gas Heating | |
[slug] => unitary-gas-heating | |
[term_group] => 0 | |
[term_taxonomy_id] => 2 | |
[taxonomy] => category | |
[description] => | |
[parent] => 0 | |
[count] => 3 | |
[cat_ID] => 2 | |
[category_count] => 3 | |
[category_description] => | |
[cat_name] => Unitary Gas Heating | |
[category_nicename] => unitary-gas-heating | |
[category_parent] => 0 | |
) | |
[queried_object_id] => 2 | |
[request] => SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (2,3,6) ) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10 | |
[posts] => Array | |
( | |
) | |
[post_count] => 0 | |
[current_post] => -1 | |
[in_the_loop] => | |
[comment_count] => 0 | |
[current_comment] => -1 | |
[found_posts] => 0 | |
[max_num_pages] => 0 | |
[max_num_comment_pages] => 0 | |
[is_single] => | |
[is_preview] => | |
[is_page] => | |
[is_archive] => 1 | |
[is_date] => | |
[is_year] => | |
[is_month] => | |
[is_day] => | |
[is_time] => | |
[is_author] => | |
[is_category] => 1 | |
[is_tag] => | |
[is_tax] => | |
[is_search] => | |
[is_feed] => | |
[is_comment_feed] => | |
[is_trackback] => | |
[is_home] => | |
[is_404] => | |
[is_comments_popup] => | |
[is_paged] => | |
[is_admin] => | |
[is_attachment] => | |
[is_singular] => | |
[is_robots] => | |
[is_posts_page] => | |
[is_post_type_archive] => | |
[query_vars_hash] => 6e027b855b20566aaf4e48615df54439 | |
[query_vars_changed] => | |
[thumbnails_cached] => | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment