[Support request] how to override a page

Home Forums Support [Support request] how to override a page

Home Forums Support how to override a page

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #582026
    sincos

    Hi,

    I would like to know if it’s possible to override that template page (in the link) because I need to override the theme pagination to fit with the plugin. The FacetWP support told us that we had to modify it…

    Thanks!

    #582255
    Leo
    Staff
    Customer Support

    Hi there,

    Not quite sure if I understand.

    Which element(s) are you trying to overwrite and what do you need to do with it?

    Let me know.

    #582280
    sincos

    The plugin FacetWP support told us to edit the theme page because the pagination is not working well…

    Here’s their answer :

    in your theme template with <?php echo facetwp_display( ‘pager’ ); ?>

    You may need to check with the theme’s support on how to override the theme pagination in your child theme.

    Thanks.

    #582761
    Tom
    Lead Developer
    Lead Developer

    So you want to replace the default pagination with that function? It will work everywhere on the site where pagination exists?

    #583791
    sincos

    Yes. The plugin support told me that is probably possible to add a condition to apply that pagination to only this page…

    #584116
    Tom
    Lead Developer
    Lead Developer

    I wonder why they don’t just filter the core pagination to add their functionality.

    You could try this:

    add_action( 'generate_paging_navigation', 'tu_custom_pagination' );
    function tu_custom_pagination() {
        if ( function_exists( 'facetwp_display' ) ) {
            echo facetwp_display( 'pager' ); 
        }
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #847017
    Marco

    just tried this – although it shows the facetwp pagination interestingly GP shows 60 pages to go whereas facet shows 68 pages in my case – I got 418 post at 7 pages – 60 seems to be correct.

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