• Hi

    How could I put m+n=p posts in my index, where m are full posts and n are excerpts?

    For example, I want 10 posts in the front page of my blog, where 2 posts are in the full form and 8 posts are in the excerpt form.

    There’s a plugin to resolve this?

Viewing 1 replies (of 1 total)
  • hi, i think you need a loop, something like this:

    <?php if (have_posts()) : ?>
    <?php $count = 0; ?>
    
    <?php while (have_posts()) : the_post(); ?>
    <?php $count++; ?>
    
      <?php if ($count < 2) : ?>
    			          <?php the_content() ?>
    
        <?php else : ?>
          <?php if ($count < 11) : ?>
    
                                      <?php the_excerpt(); ?>
    
          <?php endif; ?>
    
      <?php endif; ?>
    
    <?php endwhile; ?>
    <?php endif; ?>

    hope it helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Full and excerpt posts in the blog index’ is closed to new replies.