Title: Only display excerpt
Last modified: August 18, 2016

---

# Only display excerpt

 *  [stravaiger](https://wordpress.org/support/users/stravaiger/)
 * (@stravaiger)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/only-display-excerpt/)
 * Is it possible to only have the excerpts displayed as links to the main text 
   of each entry, instead of a whole page of complete text? I’ve just moved from
   moveable type and I love the WP interface. Very clean and efficient! The nice
   thing about MT was it didn’t display everything at the one time

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [stravaiger](https://wordpress.org/support/users/stravaiger/)
 * (@stravaiger)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/only-display-excerpt/#post-66549)
 * Thanks. Just looked at the template for index.php and changed it to get what 
   I want:
    Where it displays the story content, put in an if check. On the front
   page the query string variable p isn’t defined. So you can use this to stop it
   displaying the content for each story. When you click on the link of the story
   title, p is defined. I’ve modified index.php to only display the title and excerpt:
   change: <div class=”storycontent”> <?php the_content(); ?> </div> to: <div class
   =”storycontent”> <?php if ($_GET[p] != “”) the_content(); else the_excerpt();?
   > </div> if the excerpt is empty, it displays the content for some reason. Probably
   something to do with the_excerpt()
 *  [ellrond](https://wordpress.org/support/users/ellrond/)
 * (@ellrond)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/only-display-excerpt/#post-66583)
 * Isn’t that because you’ve put the IF statement? If the excerpt is empty, it says
   to show the whole comment.
 *  [TechGnome](https://wordpress.org/support/users/techgnome/)
 * (@techgnome)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/only-display-excerpt/#post-66584)
 * By default WP will return the content if there is no excerpt. Has nothing to 
   do with the if statement and has everything to do with the way the_excerpt() 
   works.
    TG
 *  [Ruby Sinreich](https://wordpress.org/support/users/rubyji/)
 * (@rubyji)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/only-display-excerpt/#post-67021)
 * Wow, this works effortlessly. Thank you for saving me from reformatting hundreds
   of posts from my old MT blog!
 *  Anonymous
 * [21 years, 10 months ago](https://wordpress.org/support/topic/only-display-excerpt/#post-67065)
 * There is a problem with this hack. When you use this hack, the pictures you posted
   will not show up. Can anybody help me solve this problem? Thanks!
 *  Anonymous
 * [21 years, 10 months ago](https://wordpress.org/support/topic/only-display-excerpt/#post-67096)
 * That’s cool, but how about a version that works with mod-rewrite rules turned
   on. ie; no query string…
 *  [guard952](https://wordpress.org/support/users/guard952/)
 * (@guard952)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/only-display-excerpt/#post-67099)
 * Here’s an implementation I’m currently running
    `<div class="storycontent"> <?
   php if (strlen(single_post_title("", false))>0){the_content();}else{the_excerpt();}?
   > </div> If there is not a **single post title** and there is an **excerpt**,
   then it’ll just print the excerpt. In all other cases it will print the entire
   post.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Only display excerpt’ is closed to new replies.

## Tags

 * [excerpts](https://wordpress.org/support/topic-tag/excerpts/)

 * 7 replies
 * 6 participants
 * Last reply from: [guard952](https://wordpress.org/support/users/guard952/)
 * Last activity: [21 years, 10 months ago](https://wordpress.org/support/topic/only-display-excerpt/#post-67099)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
