Support » Developing with WordPress » How to show post form a single Category using query_posts

  • I’m trying to show only the category 4 in the first page. (http://www.taibi.it)

    I’ve used the query_posts method but it still not works… it shows always the recent post

    <?php
    query_posts(‘cat=4’);
    if ($posts) : foreach ($posts as $post) : start_wp(); ?>

    <div class=”post”>
    <?php require(‘post.php’); ?>
    </div>
    <?php endforeach; else: ?>
    <p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>
    <?php endif; ?>

    Could anyone help me?

    Greats

    Davide

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to show post form a single Category using query_posts’ is closed to new replies.