Support » Plugins » Pagination Not Working – WP_Query with &Paged=

  • Resolved brianfeister


    I’ve got a custom WP_Query being called as an array and I’m not sure how to call “&paged=” when it is contained in an array.

    Normally it would be:

    wp_query->query('showposts=10'.'&paged='.$paged .'cat=classes')

    But for some reason the same code when presented as an array is not working:

                    $current_date = date('ymd');
                    $recentEvents = new WP_Query();
                        'category_name' => 'classes',
                        'meta_key' => '_date_compare',
                        'meta_compare' => '>=',
                        'meta_value' => $current_date,
                        'orderby' => 'meta_value',
                        'order' => 'ASC',
    					'showposts' => 10,
    					'&paged' => $paged
                    if ($recentEvents->have_posts()) : while ($recentEvents->have_posts()) : $recentEvents->the_post(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Pagination Not Working – WP_Query with &Paged=’ is closed to new replies.