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; ?>

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 ;)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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