WordPress.org

Ready to get started?Download WordPress

Forums

Help with my php code.... (1 post)

  1. enricoeur
    Member
    Posted 8 years ago #

    i want to display in one section of my home page a list of last 4 topics but not the last 3 because i display the last 3 in a sticky box....

    please correct my code...

    thanks

    -----------------------------------------------------------

    <?php query_posts('showposts=7'); ?>
    <?php $numero = 0; ?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php if ($numero > 2): ?>

    display output

    <?php else : $numero = numero + 1; ?>
    <?php endif; ?>
    <?php endwhile; endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.