WordPress.org

Ready to get started?Download WordPress

Forums

Other queries on /page/* broken (3 posts)

  1. OrT
    Member
    Posted 2 years ago #

    After fighting pagination for a few days, it works, but presented a new, strange problem.

    On /page/* of a custom post type, all other queries are broken.
    The page itself has 3 queries (schedule, news items (pagination), highlighted item).

    I isolate each query:

    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    
    /loop/
    
    <?php $wp_query = null; $wp_query = $temp;?>
    <?php wp_reset_postdata(); ?>
    <?php wp_reset_query(); ?>

    Any thoughts?
    Much obliged!

  2. Digital Raindrops
    Member
    Posted 2 years ago #

    There was a post a few weeks back with three loops and the issue was removing duplicates, maybe that code structure/solution might be of help help!

    http://pastebin.com/rCWj69c2

    Regards

    David

  3. OrT
    Member
    Posted 2 years ago #

    I'm back to /page/2 giving a 404. Fun on the bun.
    Thanks, David.

Topic Closed

This topic has been closed to new replies.

About this Topic