PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Pagination issue

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi Pablo,

I referred to this: https://products-filter.com/pagination-troubles-in-ajax-mode Also I tried your recommendations to disable SEO URL.

I'm having issues where pagination stops working at the halfway mark.

If I have 18 pages, I'll be able to view results until page 10 and then page 11 is a 404.

If I have 2 pages, the first page will work, and then page 2 will 404.

Any ideas on this?

Hello

Pablo is on vacation until August 19, 2024

That article not related to the issue, lets do little experiment:

  • disable HUSKY
  • and try enter page shop/page/17
  • if its not found - problems somewhere in another place
  • if its found please share in the secret area wp-admin access to this site OR its clone created by duplicator plugin

Also read: https://github.com/woocommerce/woocommerce/issues/14481

 

Thanks Alex!

I think you are onto something. I disabled Husky and the pages were still showing up.

I believe WP is reading duplicate products for some reason. This might explain why post pagination issues happen around the half-way mark of the pages.

 

Disabling Elementor Pro fixed the issue.

I shared the wp-admin info with you, hopefully you have a better idea

 

P.S. I read the article and tried a few things with no luck:

  1. Cleaned and optimized database with WP Optimize
  2. Changed theme to Twenty Twenty-Four
  3. Deactivated Jetpack, Rankmath SEO, SiteGround Optimizer (pagespeed), and
  4. Refreshed permalinks
  5. Deactivated Elementor > Taxonomy filter

Hello

So I did next investigation and now its works, but we will investigate it further (elementor code). Look, I deactivated elementor pro and see 30 products per page, so I activate it back, go to HUSKY options page -> advanced -> options ->"Products per page" and set there also 30, save, now all is ok and pagination is synchronized as should be, but still question for future. In your case this trick is work fine :)

 

Thanks Alex!

Brilliant solution but I notice an error in a few cases.

When I search"hp", it shows 50 results. 30 results on page 1 and 20 results on page 2. However, I'm still getting the 404 error on page 2.

Any idea what could be going on there?

I found this article but I wasn't sure how to apply this to Husky: https://wordpress.stackexchange.com/questions/209693/wordpress-page-2-404-pagination-problem-what-to-do

I also edited Settings > Reading > Number of posts but that didn't work

Hello

Looks like DIVI doesn want to work with woo pagination like page/2 but works for shop/filter/brand-nusign-supply/?page=2

Lets do next:

  • open file functions.php of the current wp theme
  • add there next code
    add_filter('woocommerce_pagination_args', 'custom_woocommerce_pagination_args');
    function custom_woocommerce_pagination_args($args) {
    global $wp_query;
    
    if ($wp_query->max_num_pages <= 1) {
    return $args;
    }
    
    $current_page = max(1, get_query_var('paged'));
    $total_pages = $wp_query->max_num_pages;
    
    $args['base'] = esc_url(add_query_arg('page', '%#%'));
    $args['format'] = '';
    $args['current'] = $current_page;
    $args['total'] = $total_pages;
    
    return $args;
    }
  • save and upload

Try this, if will not help share please in private area ftp access to the site to make experiments, also make backup of the file before for any case ....

 

You're a magician Alex, that fixed the issue completely.

Also, I was able to change the product quantity on Husky to 28 and it still works!

Thank you so much

Welcome :)