[Resolved] WP Paginate or BWS Pagination

Home Forums Support [Resolved] WP Paginate or BWS Pagination

Home Forums Support WP Paginate or BWS Pagination

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #486304
    Damiaan van Vliet

    Hi great support team,
    I try to implement a plug-in like WP Paginate or BWS Pagination because wp-pagenavi is not supported anymore.
    I tried several options to get one of these plug-ins to work but no luck.

    E.g. adding the codes to the functions.php or single.php or in wp hooks.

    Do you have tips or ideas for this?
    I can give more details but maybe there is something general to tell about implementing those plug-ins because they globally work on the same way.

    Thanks!

    #486308
    Damiaan van Vliet

    Oh with wp-pagenavi I normally have this:

    PHP
    add_action(‘generate_paging_navigation’,’generate_pagenavi_integration’);
    function generate_pagenavi_integration()
    {
    wp_pagenavi();
    }

    CSS
    .page-numbers {
    display: none;
    }

    #486502
    Leo
    Staff
    Customer Support

    Hi there,

    Can you provide the installation instruction from the plugin you are trying to implement?

    Thanks!

    #488178
    Damiaan van Vliet

    Of course Leo. For example the plug-in WP-paginate.
    I have to replace code within index.php (child theme) but the code they suggest I don’t see.
    Code with the_posts_pagination; for more info see:
    wp paginate info

    Thanks!

    #488593
    Tom
    Lead Developer
    Lead Developer

    You can use this hook:

    add_action( 'generate_paging_navigation', 'tu_add_wp_paginate' );
    function tu_add_wp_pagination() {
        if ( function_exists( 'wp_paginate' ) ) {
            wp_paginate();
        }
    }

    Then add this CSS:

    .nav-previous + .nav-links {
        display: none;
    }
    #490170
    Damiaan van Vliet

    Thanks Tom for reply. I tried it but it is not working, or I am blind (which is sometimes possible) πŸ˜‰

    I thought it is visible for example on the News page or the seperate blog posts.

    #490595
    Tom
    Lead Developer
    Lead Developer

    Is there a specific page on your site I can check out to see why it’s not showing up?

    #491046
    Damiaan van Vliet

    Hi Tom,
    I noticed I had too little posts so now it is visible on the blog page πŸ™‚
    test site news page
    But the pagination is not on the right position.
    Also, I thought it should be visible on a single news page like this one:
    test site blogpost

    But maybe I have to ask the developer of the plug-in?

    Thanks!

    #491535
    Tom
    Lead Developer
    Lead Developer

    You used this hook?: generate_paging_navigation

    The HTML seems to be appearing outside of that element.

    #494451
    Damiaan van Vliet

    Hi Tom,
    I placed the following code on GP Hooks, Before Header (did not know exactly which hook I need to choose)

    <script>
    add_action( 'generate_paging_navigation', 'tu_add_wp_paginate' );
    function tu_add_wp_pagination() {
        if ( function_exists( 'wp_paginate' ) ) {
            wp_paginate();
        }
    }
    </script>
    #494563
    Tom
    Lead Developer
    Lead Developer

    Instead of using hooks, use one of these methods: https://docs.generatepress.com/article/adding-php/

    #494950
    Damiaan van Vliet

    Hi Tom,
    Tried that also. Added the following to functions.php on my child theme:

    add_action( 'generate_paging_navigation', 'tu_add_wp_paginate' );
    function tu_add_wp_pagination() {
        if ( function_exists( 'wp_paginate' ) ) {
            wp_paginate();
        }
    }

    Also disabled all plug-ins except GP Premium and WP Pagination and still the same.

    Odd.

    #495816
    Tom
    Lead Developer
    Lead Developer

    Strange.. Let’s do this then:

    .generate-columns-container article + .navigation {
        -webkit-box-flex: 1;
        -webkit-flex: 1 1 100%;
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
        clear: both;
        text-align: center;
    }
    #496914
    Damiaan van Vliet

    Yes, working!! You’re the man πŸ™‚

    I also addded:

    .generate-columns-container .paging-navigation {
        display: none;
    }

    Because the old navigation also was visible.

    But solved, thanks Tom!

    #497467
    Tom
    Lead Developer
    Lead Developer

    Glad I could help! πŸ™‚

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.