Currently seeking new career opportunities in web development, particularly with Laravel, Hire Me

Wordpress Twenty Thirteen theme - display post excerpt's

David Carr

Tutorials Wordpress

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!

Laravel Modules Your Logo Your Logo Your Logo

Become a sponsor

Help support the blog so that I can continue creating new content!


My Latest Book

Modular Laravel Book - Laravel: The Modular way

Learn how to build modular applications with Laravel Find out more

Subscribe to my newsletter

Subscribe and get my books and product announcements.

Learn Laravel with Laracasts

Faster Laravel Hosting

© 2006 - 2024 DC Blog. All code MIT license. All rights reserved.