• Resolved realepicurean

    (@realepicurean)


    Hi guys,
    I want to program a loop (2 loops?) so that my front page shows the first post in full (well, up to the “read more”), and the rest as excerpts.

    How do I go about that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you only want this on the frontpage, I would suggest you use home.php. If your theme doesn’t have a home.php, just copy index.php and rename it.

    Then edit it like this:

    Replace

    <?php while (have_posts()) : the_post(); ?>

    with

    <?php $i = 0; while (have_posts()) : the_post(); $i++; ?>

    Then modify

    <?php the_content('Read the rest of this entry &raquo;'); ?>

    to

    <?php
    if($i == 1)
    the_content('Read the rest of this entry &raquo;');
    else
    the_excerpt();
    ?>

    I think that oughta do it.

    Thread Starter realepicurean

    (@realepicurean)

    Ta!

    Exactly what I needed. You guys are awesome, thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Front page to show 1st post full, rest as excerpts?’ is closed to new replies.