0

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.

    <?php
    ('cat=111&posts_per_page=1');
    if (have_posts())
    ?>
    <?php while (have_posts()) : the_post(); ?>
<?php endwhile; ?>
1

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.