Home Forums WoodMart support forum Products (grid or carousel) problem with pagination

Products (grid or carousel) problem with pagination

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #597540

    mozex
    Participant

    I am trying to add some carousels to my category page layout, but the problem is that when the number of pages changes from the category, it also affects the carousel. For example, if you go to page 2 of that category and the URL gets /page/2, the carousel will show the second set of the specified query, which is incorrect.
    I checked the relevant code, and this is where the problem is:

    This is used for rendering the widget

    
    woodmart_elementor_products_template( $this->get_settings_for_display() );
    

    And inside that, all queries use pagination like this:

    
    $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
    ...
    $query_args = array(
       'post_type'           => $settings['query_post_type'],
       'post_status'         => 'publish',
       'ignore_sticky_posts' => 1,
       'paged'               => $paged,
       'orderby'             => $ordering_args['orderby'],
       'order'               => $ordering_args['order'],
       'posts_per_page'      => $settings['items_per_page'],
       'meta_query'          => WC()->query->get_meta_query(), // phpcs:ignore
       'tax_query'           => WC()->query->get_tax_query(), // phpcs:ignore
    );
    

    There is no option to turn off pagination at all.

    • This topic was modified 2 months, 1 week ago by mozex.
    • This topic was modified 2 months, 1 week ago by mozex.
    • This topic was modified 2 months, 1 week ago by mozex.
    #597712

    Luke Nielsen
    Keymaster

    Hello,

    Could you please send a video for a better understanding of the issue?

    I look forward to collaborating with you!

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)