WordPress.org

Ready to get started?Download WordPress

Forums

Query posts but exclude featured category (2 posts)

  1. cheaper
    Member
    Posted 3 years ago #

    Hi all

    I wonder if anyone can help amend this php query, so that it excludes posts from the featured category.

    <!-- begin recent posts -->

    <?php
    $wp_query = $tmp_query;
    $odd = false;
    if (have_posts()) :
    while (have_posts()) : the_post();
    $odd = !$odd;
    ?>

    Thanks for reading

    Mike

  2. MichaelH
    Member
    Posted 3 years ago #

    The article The Loop has examples for you.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.