Wordpress Twenty Thirteen theme - display post excerpt's

David Carr

1 min read - 22nd Oct, 2013

By default the Wordpress theme twenty thirteen shows the full post. When using the post types such as gallery,video,link etc that works great but if your using the standard post type and want to only show the post excerpts and not the full post that's not ideal.

To change this one way is to open content.php and find the following line:

<?php the_content( __( 'Continue reading <span class="meta-nav">?</span>', 'twentythirteen' ) ); ?>

Replace it with an if statement, to only show the content is on a single post otherwise show the except.

<?php if ( is_single() ) : ?>
    <?php the_content( __( 'Continue reading <span class="meta-nav">?</span>', 'twentythirteen' ) ); ?>
<?php else : ?>
       <?php the_excerpt(); ?>
<?php endif; ?>

Save and upload your done!

0 comments
Add a comment

Copyright © 2006 - 2024 DC Blog - All rights reserved.