Title: the_excerpt code issue
Last modified: August 20, 2016

---

# the_excerpt code issue

 *  [rezabarca](https://wordpress.org/support/users/rezabarca/)
 * (@rezabarca)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/the_excerpt-code-issue/)
 * why the `<?php the_excerpt();?>` code dont work .
 * _[Again, don’t bump]_

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/the_excerpt-code-issue/#post-3592278)
 * please post the full code of the template where you use `the_excerpt()` – see
   [http://codex.wordpress.org/Forum_Welcome#Posting_Code](http://codex.wordpress.org/Forum_Welcome#Posting_Code)
 * also, describe what ‘dont work’ means?
    what is not working? what is the result?
 * what do you expect?
 *  Thread Starter [rezabarca](https://wordpress.org/support/users/rezabarca/)
 * (@rezabarca)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/the_excerpt-code-issue/#post-3592280)
 * in the index.php for the post’s i remove the `<?php the_content();?>` and add
   the `<?php the_excerpt();?>` for cutting my post content . but the code dont 
   work and my post’s shows to long yet in home page
 *  Thread Starter [rezabarca](https://wordpress.org/support/users/rezabarca/)
 * (@rezabarca)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/the_excerpt-code-issue/#post-3592282)
 *     ```
       <div id="main">
   
       <?php get_header() ?>
   
          <div id="container">
   
          <div id="rw">
       <iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fmp3box.co&width=292&height=290&show_faces=true&colorscheme=dark&stream=false&border_color=%230000ff&header=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:290px;" allowTransparency="true"></iframe>
   
       </div>
       <?php if(have_posts()):?>
       <?php while(have_posts()):the_post();?>
        <div id="content">
       <div id="content-title" >
       <h3> <a href="<?php the_permalink();?>"><?php the_title();?></a></h3>
       </div>
       <div id="content-text">
         <?php the_post_thumbnail();?>
            <?php the_excerpt(); ?> <-----this code replaced with the_content
        </div>
        </div>
   
       	 <?php endwhile;?>
       	 <?php endif;?>
       	 <div style="text-align:center;">
       <?php posts_nav_link(' · ', '<--newest' ,'older-->'); ?>
       </div>
   
         </div>
   
       <?php get_sidebar() ?>
       <?php get_footer() ?>
       </div>
       ```
   
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/the_excerpt-code-issue/#post-3592293)
 * some themes do not use index.php for the home page; [http://codex.wordpress.org/Template_Hierarchy](http://codex.wordpress.org/Template_Hierarchy)
 * does your theme have a _home.php _or _front-page.php _template?
 * what theme are you using?
 *  Thread Starter [rezabarca](https://wordpress.org/support/users/rezabarca/)
 * (@rezabarca)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/the_excerpt-code-issue/#post-3592308)
 * I make a theme by myself and used it now
 *  Thread Starter [rezabarca](https://wordpress.org/support/users/rezabarca/)
 * (@rezabarca)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/the_excerpt-code-issue/#post-3592309)
 * and i dont have home.php or front-page.php . and i added this code in index.php
 *  [kevin heath](https://wordpress.org/support/users/ypraise/)
 * (@ypraise)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/the_excerpt-code-issue/#post-3592342)
 * Hi
 * I’m not sure why it’s not working as the code looks good.
 * You don’t have any chaching plugins or code in oortation that would stop the 
   changes from being seen do you?
 * Kevin
 *  Thread Starter [rezabarca](https://wordpress.org/support/users/rezabarca/)
 * (@rezabarca)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/the_excerpt-code-issue/#post-3592359)
 * finally i find a plugin who work like the_excerpt code. but i must find where
   is the problem?
 *  [kevin heath](https://wordpress.org/support/users/ypraise/)
 * (@ypraise)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/the_excerpt-code-issue/#post-3592486)
 * Hi
 * I don’t think it is your code you have a problem with as I tested it on one of
   my sites and it works fine.
 * Kevin

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

The topic ‘the_excerpt code issue’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 3 participants
 * Last reply from: [kevin heath](https://wordpress.org/support/users/ypraise/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/the_excerpt-code-issue/#post-3592486)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
