Forums

How do I create Excerpt Previews (5 posts)

  1. sebastianotero
    Member
    Posted 3 months ago #

    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

  2. do77
    Member
    Posted 3 months ago #

    Use <?php the_excerpt(); ?> instead of <?php the_content(); ?>

  3. sebastianotero
    Member
    Posted 3 months ago #

    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

  4. do77
    Member
    Posted 3 months ago #

    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.

  5. mjfus
    Member
    Posted 1 week ago #

    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');
    ?>.

Reply

You must log in to post.

About this Topic