I have change the content.php in my child theme so that it reflects on the home page a full top post and the rest to be thumbnails with title and excerpts.
The problem is that I get two post titles in my thumbnails with excerpts http://www.ecobitat.com
this is what I have for a code:
<?php if (is_search () || is_paged() || $wp_query->current_post> 0): // Only display excerpts for Posts and Search ?> <div class="entry-summary"></div> <!-- This adds the post thumbnail/featured image, title and excerpt--> <div class="excerpt-thumbpost"> <h7 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute() ); ?>" rel="bookmark"><?php the_title(); ?></a></h7> <?php the_post_thumbnail('excerpt-thumbnail', 'class=alignleft' ) ?> </div> <?php the_excerpt(); ?>
I know that the problem is in the “$wp_query->current_post> 0” above. How can I omit the extra title with date? I want to keep the one that is on the side of the thumbnail……
- The topic ‘Omit or change title post from $wp_query->current_post> 0’ is closed to new replies.