WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to use more tag for first post, excerpt for rest (3 posts)

  1. DLThompson06
    Member
    Posted 1 year ago #

    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

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    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.

  3. alchymyth
    Forum Moderator
    Posted 1 year ago #

    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 ?>

Topic Closed

This topic has been closed to new replies.

About this Topic