[Support request] Pagination at bottom of page

Home Forums Support [Support request] Pagination at bottom of page

Home Forums Support Pagination at bottom of page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2195366
    Paul

    Pagination seems to be working fine but is showing at the top of the pages only, mainly archive/taxonomy pages.

    How do I get it to show at the top and the bottom?

    #2195381
    Fernando
    Customer Support

    Hi Paul,

    To have a better understanding of the issue, may you kindly provide a link to a page in your site where this issue is visible?

    You may use the private information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    Hope to hear from you soon. ๐Ÿ™‚

    #2195383
    Paul

    Hi Fernando.

    Here is a good example (In private info box)…

    #2195400
    Fernando
    Customer Support

    Hi Paul,

    How are you adding the table?

    With your structure now, you can try adding this CSS in Appearance > Customize > Additional CSS:

    body.archive .site-main{
        display:flex;
        flex-direction:column;
    }
    
    nav#nav-below {
        order:1;
    }

    Kindly let us know. ๐Ÿ™‚

    #2195758
    Paul

    Hi Fernando

    The table is simply started in the archive-posttype which calls in a content-archiveposttype template with rows and columns for the loop.

    That CSS moved the pagination to the bottom which is great but if I wanted to also add a second one at the top is that possible?

    Thanks!

    #2195769
    David
    Staff
    Customer Support

    Hi there,

    you can add this PHP Snippet to hook in another paging navigation:

    add_action( 'generate_before_main_content', 'lh_move_pagination', 0 );
    function lh_move_pagination() {
        if ( is_archive() ) {
            echo '<nav id="nav-below" class="paging-navigation top-navigation" aria-label="Archive Page">';
            the_posts_pagination( array(
    	    'end_size' => 2,
    	    'mid_size' => apply_filters( 'generate_pagination_mid_size', 1 ),
                'prev_text' => apply_filters( 'generate_previous_link_text', __( '&larr; Previous', 'generatepress' ) ),
    	    'next_text' => apply_filters( 'generate_next_link_text', __( 'Next &rarr;', 'generatepress' ) ),
    	) );
            echo '</nav>';
        }
    }

    See if that works to add a second nav, and then we can talk about re-ordering the various elements.

    #2197505
    Paul

    Hi David

    Thanks for that. I now have both nav at top and bottom.

    #2197596
    David
    Staff
    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.