• Hello,

    what I’m trying to do is grouping posts by its ID. I don’t know why, but I get duplicates.

    So what I tried was to do the following:

    <?php
      $args = array(
        'post_status' => 'publish',
        'author' => 6,
        'groupby' => 'wp_posts.ID',
        'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1,
      );
      query_posts($args);
      get_template_part('template', 'loop'); ?>

    But that doesn’t do anything. Anyone knows a solution?

    Thanks

  • The topic ‘Add groupby to query_posts’ is closed to new replies.