Support » Themes and Templates » recent posts excerpt

  • Resolved davidmarino88


    All, I would like to update my wordpress twenty eleven theme to have recent posts as excerpts instead of the current (last post as full and everything else showing only the title). Does anyone have easy code to include in the child theme?
    Thanks in advanced.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael


    Forum Moderator

    copy showcase.php into the child theme, add the the_excerpt() to this section:

    // For all other recent posts, just display the title and comment status.
    					while ( $recent->have_posts() ) : $recent->the_post(); ?>
    						<li class="entry-title">
    							<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
    <span class="recent-excerpt">
    <?php the_excerpt(); ?>
    							<span class="comments-link">
    								<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?>

    will need some formatting using .recent-excerpt

    Thank you for your help. It worked. The <?php the_excerpt(); ?> was key.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘recent posts excerpt’ is closed to new replies.