Permalink
Browse files

Use get_queried_object_id() instead of $wp_query.

  • Loading branch information...
1 parent 6338608 commit 26767bdc729904651becab18153a71b2c13dce10 @justintadlock committed Jan 9, 2013
Showing with 1 addition and 3 deletions.
  1. +1 −3 loop-meta.php
View
@@ -12,10 +12,8 @@
<?php if ( is_home() && !is_front_page() ) : ?>
- <?php global $wp_query; ?>
-
<div class="loop-meta">
- <h1 class="loop-title"><?php echo get_post_field( 'post_title', $wp_query->get_queried_object_id() ); ?></h1>
+ <h1 class="loop-title"><?php echo get_post_field( 'post_title', get_queried_object_id() ); ?></h1>
</div><!-- .loop-meta -->
<?php elseif ( is_category() ) : ?>

0 comments on commit 26767bd

Please sign in to comment.