Enable post excerpts in wordpress theme twentythirteen

In TwentyThirteen, there are many files, their names’re started with content:

  1. content.php
  2. content-none.php
  3. content-aside.php
  4. content-audio.php
  5. content-chat.php
  6. content-gallery.php
  7. content-image.php
  8. content-link.php
  9. content-quote.php
  10. content-status.php
  11. content-video.php

Among them, except the first two, all the others are for different post types, and you can understand their usages from their names.

The 2nd one, content-none.php is used to display apology texts, when there is no content found with a query. And the 1st one, content.php is used in various display pages with two conditions, where:

  • is_search() — is to check whether it is the search result page
  • is_single() — is to check whether it is the post details page

If you open the index.php, you will find a code:

<?php get_template_part( 'content', get_post_format() ); ?>

Here the template part (content.php) is called.

Answer

So, to show excerpt in your front page or home page, you will need to modify content.php. Like the is_search(), is_single(), there are several other checkers in WordPress:

  • is_home() — is to check whether it is the home page
  • is_front_page() — is to check whether it is the front-page
  • is_category() — is to check whether it is the category archive page
  • is_archive() — is to check whether it is the general archive page
  • is_tag() — is to check whether it is the tags archive page
  • …so on

And you may know that, to enable excerpt instead of full content, you will have to change the code the_content() to the_excerpt().

More Details

EDIT

Yep, @Rarst said a very important thing that, if you make change into any public theme, the changes will be wiped out when a new update will take place. So, to put your modifications in place, you have to make a Child Theme on TwentyThirteen. A Child Theme is nothing but a new folder with a stylesheet. You can get that at: