WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
Won;t display more than one page (2 posts)

  1. riscconline
    Member
    Posted 1 year ago #

    I'm struggling with this plugin, I can't seem to get it to work. The code below should return 23 results but only displays one page on the navigation. I want the page to display 18 events and then offer the user the option for going to page two etc.

    Here is my code.

    <?php
    global $paged;

    $count=0;
    $current_date = date('j M Y');
    $end_date = '30 sept 2013';

    $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
    $upcoming = new WP_Query();
    $upcoming->query(array('posts_per_page'=>18,'post_type'=> 'tribe_events','eventDisplay' => 'upcoming','venue'=>$post_id_venue,'eventCat'=>$category,'start_date'=>$date,'paged' => $paged));
    ?>
    <p><?php wp_pagenavi(array('type' => 'multipart', 'query' => $upcoming)); ?><p>
    <?php
    if ($upcoming->have_posts()) :
    while ($upcoming->have_posts()) :
    $upcoming->the_post();
    ?>
    " rel="bookmark"><?php the_title(); ?>
    <?php endwhile; echo"

    "; ?>
    <p><?php wp_pagenavi(array('type' => 'multipart', 'query' => $upcoming)); ?></p>
    <?php
    endif;
    wp_reset_query();
    ?>

    Any help with this would be hugely appreciated. You can view the site I'm working on here: http://www.saltairefestival.co.uk/events-test/

    Thanks

    Craig

    http://wordpress.org/plugins/wp-pagenavi/

  2. graphical_force
    Member
    Posted 1 year ago #

    I'm also having an issue with only displaying one page regardless of the amount of posts. It was working so I'm sure an update broke it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic