WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following is not working to call posts from a specific category and only grab the number of posts selected.

I'm using more than one loop on a page as I am using this to create a "featured content" section on my homepage.

    if (have_posts())
    <?php while (have_posts()) : the_post(); ?>
<?php endwhile; ?>
share|improve this question
up vote 1 down vote accepted

You're not actually running any queries. Need to run wp_query(), query_posts() or get_posts(). All are covered in great detail within the codex. Though you already have your parameters listed up ;)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.