Black Friday sale is now on! 50% off Laravel: The Modular Way. Learn more

Wordpress Twenty Thirteen theme - display post excerpt's

David Carr

Wordpress Tutorials

    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 Book by David Carr

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

    Subscribe to my newsletter

    Subscribe and get my books and product announcements.

    © 2009 - 2022 DC Blog. All code MIT license. All rights reserved.