Skip to content

Commit

Permalink
Use get_queried_object_id() instead of $wp_query.
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Tadlock committed Jan 9, 2013
1 parent 6338608 commit 26767bd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions loop-meta.php
Expand Up @@ -12,10 +12,8 @@


<?php if ( is_home() && !is_front_page() ) : ?> <?php if ( is_home() && !is_front_page() ) : ?>


<?php global $wp_query; ?>

<div class="loop-meta"> <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 --> </div><!-- .loop-meta -->


<?php elseif ( is_category() ) : ?> <?php elseif ( is_category() ) : ?>
Expand Down

0 comments on commit 26767bd

Please sign in to comment.