WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Pagination Not Working – WP_Query with &Paged=

[Resolved] Pagination Not Working – WP_Query with &Paged=

  • 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:

    <?php
                    $current_date = date('ymd');
                    $recentEvents = new WP_Query();
                    $recentEvents->query(array(
                        '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 ‘[Resolved] Pagination Not Working – WP_Query with &Paged=’ is closed to new replies.