Support » Fixing WordPress » How to use more tag for first post, excerpt for rest

  • Resolved DLThompson06

    (@dlthompson06)


    I’ve finally got my blog set up so that only the first post shows in full on the main page, with the older posts in excerpt form, but I’d like to figure out how to have the first post only show up to the <!–more–> tag. The reason is because I’d really like the picture in the first post to be larger, but not necessarily have the full text of that post. Is there a way I can do that? Thanks. site: http://www.meandmydiy.com

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    (@esmi)

    Forum Moderator

    Does your theme’s main post page template use the_content() for the first post? If so, you can just add the <!--more--> tag to your posts to define where the post teaser should end.

    Michael

    (@alchymyth)

    Forum Moderator

    in content.php, try and replace:

    <?php if ( is_search() ) : // Only display Excerpts for Search ?>

    with:

    <?php if ( is_search() || $wp_query->current_post >= 1 ) : // Only display Excerpts for Search and all other than the first post ?>

    or:

    <?php if ( is_search() || $wp_query->current_post >= 1 || is_paged() ) : // Only display Excerpts for Search and all other than the first post ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to use more tag for first post, excerpt for rest’ is closed to new replies.