WordPress.org

Ready to get started?Download WordPress

Forums

Navigation weird problem (5 posts)

  1. alexandruv
    Member
    Posted 1 year ago #

    Hello Everyone,
    I'm trying to code my website using the Reverie framework for WP and all works ok except the pagination on my Blog.

    I'm using this function to generate the pagination numbers: http://pastebin.com/HXtsgj88

    This works well on Categories pagination but not on the main blog.
    loop-index.php is in charge of displaying my Blog and the code of loop-index.php is here: http://pastebin.com/t6Dss6FG

    My website is http://www.zakochaniwfotografii.pl/blog/

    Any help appreciated!
    Thank you,
    Alex

  2. Twansparant
    Member
    Posted 1 year ago #

    I'm having the exact same problem.
    If I echo $wp_query->max_num_pages within the reverie_pagination function, it echoes 0 no matter what...

  3. Twansparant
    Member
    Posted 1 year ago #

    Got it, you should use:
    $wp_query = new WP_Query( 'cat=-16' ); instead of query_posts
    Because the $wp_query is called globally in the reverie_pagination function.

  4. WebWookie
    Member
    Posted 1 year ago #

    What version of Reverie was this? The links to the paste bins are empty now and I'm having similar issues.

  5. WebWookie
    Member
    Posted 1 year ago #

    It looks like I just had to escape the blog feed per these instructions...
    https://codex.wordpress.org/Pagination#Troubleshooting_Broken_Pagination

    Here is the code I used in the loop.php just wrap your loop with...

    <!-- Exclude News, In the News, and Press Releases category posts from Blog feed -->
    <?php if ( is_page('blog')) {
    query_posts($query_string . '&cat=-171,-56,-14');
    }
    ?>
    
    <!-- Loop goes here -->
    
    <?php endif; ?>

    Good luck!

Topic Closed

This topic has been closed to new replies.

About this Topic