Title: the_excerpt
Last modified: August 20, 2016

---

# the_excerpt

 *  Resolved [intcon](https://wordpress.org/support/users/intcon/)
 * (@intcon)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/the_excerpt-5/)
 * Hi..
 * I’ve read where you change the_excerpt into the_content to change blog posts 
   to show the entire post instead of just an excerpt..
 * here’s what my code in index.php says
 *     ```
       <div class="post-content">
         		          <?php $post_excerpt = of_get_option('post_excerpt'); ?>
         		      		<?php if ($post_excerpt=='true' || $post_excerpt=='') { ?>
         		            <div class="excerpt"><?php $excerpt = get_the_excerpt(); echo my_string_limit_words($excerpt,45);?>
       ```
   
 * which excerpt do i change?
 * thanks!
 * carrie

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/the_excerpt-5/#post-2909459)
 * your posted section is only part of a possibly more relevant code;
 * can you poast the full code of that template?
    [(see forum guidelines for posting code)](http://codex.wordpress.org/Forum_Welcome#Posting_Code)
 *  Thread Starter [intcon](https://wordpress.org/support/users/intcon/)
 * (@intcon)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/the_excerpt-5/#post-2909460)
 * [http://pastebin.com/Fw8AMUSE](http://pastebin.com/Fw8AMUSE)
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/the_excerpt-5/#post-2909467)
 * in the most simple case, try and replace this section:
 *     ```
       <?php $post_excerpt = of_get_option('post_excerpt'); ?>
                                       <?php if ($post_excerpt=='true' || $post_excerpt=='') { ?>
                                   <div class="excerpt"><?php $excerpt = get_the_excerpt(); echo my_string_limit_words($excerpt,45);?></div>
                                 <?php } ?>
       ```
   
 * with:
 *     ```
       <div class="excerpt"><?php the_content(); ?></div>
       ```
   
 * **OR alternatively** (experimental as I don’t know exactly what the theme option
   does):
 * there seems to be a theme option to select to show the excerpt or nothing; if
   you want to keep this and change it to excerpt or content, then change the section
   to:
 *     ```
       <?php $post_excerpt = of_get_option('post_excerpt'); ?>
                                       <?php if ($post_excerpt=='true' || $post_excerpt=='') { ?>
                                   <div class="excerpt"><?php $excerpt = get_the_excerpt(); echo my_string_limit_words($excerpt,45);?></div>
                                 <?php }
       else { ?>
       <div class="excerpt"><?php the_content(); ?></div>
       <?php } ?>
       ```
   
 *  Thread Starter [intcon](https://wordpress.org/support/users/intcon/)
 * (@intcon)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/the_excerpt-5/#post-2909675)
 * woohoo!! the first one worked…thanks so much!

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

The topic ‘the_excerpt’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [intcon](https://wordpress.org/support/users/intcon/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/the_excerpt-5/#post-2909675)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
