• I’m using query_posts to display posts from one category on a page (not home). Using this code:

    ‘[php]
    require(‘../wp/wp-load.php’);
    query_posts( array (‘category_name’ => ‘Teams’, ‘posts_per_page’ => -1, ‘orderby’ => ‘title’, ‘order’ => ‘ ASC’));
    while (have_posts()): the_post();
    the_content();
    endwhile;
    echo ‘End’;
    [/php]‘

    where there is one post in the Teams category results in the post followed by the echoed ‘End’ followed by the same post again. https://illinoisladylightning.com/wp/test/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘query_posts results in duplicates’ is closed to new replies.