grandeabobora
Member
Posted 1 year ago #
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?
Belgraded
Member
Posted 1 year ago #
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.