Title: How do I create Excerpt Previews
Last modified: August 19, 2016

---

# How do I create Excerpt Previews

 *  [sebastianotero](https://wordpress.org/support/users/sebastianotero/)
 * (@sebastianotero)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/how-do-i-create-excerpt-previews/)
 * Hello friends
 * I would like to make my posts appear in preview format with the teaser line, 
   part of the text, and a thumbnail of the image that is featured in the post.
 * I dont know how to do this
 * Thanks for your suggestions!
 * Sebastian

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

 *  [do77](https://wordpress.org/support/users/do77/)
 * (@do77)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/how-do-i-create-excerpt-previews/#post-1185070)
 * Use <?php the_excerpt(); ?> instead of <?php the_content(); ?>
 *  Thread Starter [sebastianotero](https://wordpress.org/support/users/sebastianotero/)
 * (@sebastianotero)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/how-do-i-create-excerpt-previews/#post-1185071)
 * Thanks! Im newb. Where do I paste that?
 * I wanna do it “a la” search engine result. Example:
 * [http://search.yahoo.com/search?p=women+dancing&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-832](http://search.yahoo.com/search?p=women+dancing&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-832)
 *  [do77](https://wordpress.org/support/users/do77/)
 * (@do77)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/how-do-i-create-excerpt-previews/#post-1185075)
 * That depends where you want to show it. If you want to show excerpts on your 
   homepage you need to edit your **index.php** file. Find the line where it says
   <?php the_content(); ?> and place <?php the_excerpt(); ?> instead.
 *  [mjfus](https://wordpress.org/support/users/mjfus/)
 * (@mjfus)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/how-do-i-create-excerpt-previews/#post-1185476)
 * Can someone direct me on where to place ‘the_content’ tag? I’m trying to display
   the full text of a post on my homepage page using the code below:
 * <?php
    global $more; // Declare global $more (before the loop). $more = 1; //
   Set (inside the loop) to display all content, including text below more. the_content();?
   >
 * I don’t know where to put this code, because I’m using a template that doesn’t
   have <?php the_content(); ?> or <?php the_excerpt(); ?>
    in the index.php file.
   All that’s in the index.php file is:
 * <?php
    global $options; foreach ($options as $value) { if (get_settings( $value[‘
   id’] ) === FALSE) { $$value[‘id’] = $value[‘std’]; } else { $$value[‘id’] = get_settings(
   $value[‘id’] ); } } if($swift_magzine==’magzine’) include(‘layouts/magzine.php’);
   else include(‘layouts/blog.php’); ?>.
 *  [franclin](https://wordpress.org/support/users/franclin/)
 * (@franclin)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/how-do-i-create-excerpt-previews/#post-1185477)
    1. Create a new PHP template page. Call it “Overview” or something like that.
    2. Past in the code found below.
    3. save the new file to your wp site
    4. Open your admin page. Create a page.
    5. click quick edit and select “overview” from the template drop down.
 * Now this page will show all of your post within a category up to the <more> link.
 * If you want this on your home page just add the script to your index page along
   with an if statement to check that this is the home page and skip the template
   part.
 * in simple English this is what the code does:
    Search all posts (you can limit
   this to categories) Display the post. Limit the amount you show to stop when 
   it sees the <!–more–> tag.
 * *note the div tags are for styling the results
 *     ```
       <?php
       /*
       Template Name: Overview
       */
       ?>
   
       <?php
       query_posts('category_name=mycategory');
   
       global $more;
       // set $more to 0 in order to only get the first part of the post
       $more = 0; 
   
       // the Loop
       while (have_posts()) : the_post();
       ?>
   
       				<div class="container">
       				<!-- Display the Title as a link to the Post's permalink. -->
       						<a href="<?php the_permalink(); ?>">permalink</a>
       						<div id="title"><?php the_title(); ?></div>
   
       				<!-- Display the Post's Content in a div box. -->
       						<div class="entry">
       						<!-- the content of the post -->
       						<?php the_content('view full the article»'); ?>
       						</div>
       				</div> <!-- closes the first div box -->
   
       <?php
       endwhile;
       ?>
       ```
   
 * Check out [query_posts](http://codex.wordpress.org/Template_Tags/query_posts)
   for more details

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

The topic ‘How do I create Excerpt Previews’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 4 participants
 * Last reply from: [franclin](https://wordpress.org/support/users/franclin/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/how-do-i-create-excerpt-previews/#post-1185477)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
