• hi,

    i just want want to ask how to include content in just the first of 5 recent post.

    i already know how to call the recent posts by a loop. what i want to achieve is to have the content (themefunction_content (’10’) in just the most recent post and to be followed by just titles of the 4 remaining recent posts.

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • try to use Dashboard > Setting > reading > Blog pages show at most: 5

    Thread Starter thirdgarcia

    (@thirdgarcia)

    ebizblo1 thanks for the reply i already know how to do that.

    what i want to do is like this:

    RECENT POST 1
    content content content content
    content content content content
    content content content content
    content content content content

    RECENT POST 2
    RECENT POST 3
    RECENT POST 4
    RECENT POST 5

    —————————
    As you can see the first recent post displays content while the others shows only title.

    <?php
     $count = 0;
     while(have_posts()): the_post();
    ?>
     <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title() ?></a></h2>
     <?php if($count==0): ?>
     <p><?php the_content() ?></p>
     <?php endif;?>
    <?php $count++;
          endwhile;
    ?>

    Try this once.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘5 Recent Post’ is closed to new replies.