Title: frontpage posts formatting
Last modified: August 21, 2016

---

# frontpage posts formatting

 *  Resolved [blingenfelter](https://wordpress.org/support/users/blingenfelter/)
 * (@blingenfelter)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/frontpage-posts-formatting/)
 * How do I get the front page post excerpts to keep their formatting.
    The excerpt
   that shows on the front page seems to strip out line breaks no matter what html
   code I use…
 * Ben

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

 *  Thread Starter [blingenfelter](https://wordpress.org/support/users/blingenfelter/)
 * (@blingenfelter)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/frontpage-posts-formatting/#post-4048713)
 * Hmmm… When I past the post (html) into the “excerpt” box, I have success, but
   otherwise, posts appear a mess.
    Why?
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/frontpage-posts-formatting/#post-4048716)
 * Excerpts strip out formatting yes –
 * [http://codex.wordpress.org/Excerpt](http://codex.wordpress.org/Excerpt)
 *  Thread Starter [blingenfelter](https://wordpress.org/support/users/blingenfelter/)
 * (@blingenfelter)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/frontpage-posts-formatting/#post-4048718)
 * But in this case, the excerpt box is the only way I seem to be able to keep any
   formatting…
 *  Thread Starter [blingenfelter](https://wordpress.org/support/users/blingenfelter/)
 * (@blingenfelter)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/frontpage-posts-formatting/#post-4048719)
 * Are you talking about the automatic excerpt or the manual excerpt?
 *  Theme Author [robertostrabelli](https://wordpress.org/support/users/robertostrabelli/)
 * (@robertostrabelli)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/frontpage-posts-formatting/#post-4048834)
 * Hi
 * In the index.php file, replace this code:
 *     ```
       <?php
       if ( has_post_thumbnail()) {
       get_template_part( 'content', 'cha1' );
       } else {
       get_template_part( 'content', 'cha2' );
       }
       ?>
       ```
   
 * For this:
 *     ```
       <article class="chamada">
       <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
       <h3><a href="<?php the_permalink();?>"><?php the_title() ; ?></a></h3>
       <?php edit_post_link(); ?>
       <p><small><?php
       echo str_replace("<img ", "<img title='' ", get_avatar( get_the_author_meta('user_email'), $size = '20', '', ''));
       ?> <?php the_author_posts_link(); ?> - <?php the_category(', ');?> - <a href="<?php the_permalink();?>"><?php the_date(); ?></a></small></p>
       <div class="entry-content">
       <?php the_content(); ?>
       <?php wp_link_pages(); ?>
       </div>
       </div>
       </article>
       ```
   
 * In the coming days I will update the theme and you can show entire posts on the
   frontpage choosing the option in Appearance -> Customize.
 *  Theme Author [robertostrabelli](https://wordpress.org/support/users/robertostrabelli/)
 * (@robertostrabelli)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/frontpage-posts-formatting/#post-4048845)
 * My mistake. the code to be replaced is:
 *     ```
       <article class="chamada">
       <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
       <h3><a href="<?php the_permalink();?>"><?php the_title() ; ?></a></h3>
       <?php edit_post_link(); ?>
       <p><small><?php
       echo str_replace("<img ", "<img title='' ", get_avatar( get_the_author_meta('user_email'), $size = '20', '', ''));
       ?> <?php the_author_posts_link(); ?> - <?php the_category(', ');?> - <a href="<?php the_permalink();?>"><?php the_date(); ?></a></small></p>
       <?php the_excerpt(); ?>
       </div>
       </article>
       ```
   
 *  Thread Starter [blingenfelter](https://wordpress.org/support/users/blingenfelter/)
 * (@blingenfelter)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/frontpage-posts-formatting/#post-4048855)
 * Thanks. I’m enjoying this theme very much.

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

The topic ‘frontpage posts formatting’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/coffee-time/2.1.8/screenshot.png)
 * Coffee Time
 * [Support Threads](https://wordpress.org/support/theme/coffee-time/)
 * [Active Topics](https://wordpress.org/support/theme/coffee-time/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/coffee-time/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/coffee-time/reviews/)

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [post formatting](https://wordpress.org/support/topic-tag/post-formatting/)

 * 7 replies
 * 3 participants
 * Last reply from: [blingenfelter](https://wordpress.org/support/users/blingenfelter/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/frontpage-posts-formatting/#post-4048855)
 * Status: resolved