Forums

full post of 1 post and excerpt of others (6 posts)

  1. raptrex
    Member
    Posted 5 years ago #

    how can i do something kind of like this site?
    http://www.pronetadvertising.com/

    show your latest post (the full post)

    and then your other 4 posts as excerpts?

  2. raptrex
    Member
    Posted 5 years ago #

    another example
    http://ifelse.co.uk/

  3. raptrex
    Member
    Posted 5 years ago #

    i need help on this

  4. moshu
    Member
    Posted 5 years ago #

    Then why don't you ask the owners of the two blogs you linked to. A polite question/request sometimes makes miracles :)

  5. raptrex
    Member
    Posted 5 years ago #

    oh i didnt think of that.
    well anyway i did some reading and came up with this

    <div id="content">
    <?php query_posts('posts_per_page=3');
    $postnum = 2; ?>
    <?php if (have_posts()) :?>
    <?php $postCount=0; ?>
    <?php while (have_posts()) : the_post();?>
    <?php $postCount++;?>
    <div class="entry entry-<?php echo $postCount ;?>">
    <div class="entrybody">
    <?php if ($postnum == $postCount) {
    the_excerpt('Continue Reading the Post');
    } else {
    the_content('Read the rest of the Post'); } ?></div>

    how can i make it show the excerpt for post 2, 3 and so on

  6. theiconoclast31
    Member
    Posted 5 years ago #

    You need to modify your loop by adding an incrementing variable and a condition. Check this out, it explains it pretty well:

    http://troidus.com/article/6

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags