if($current_page < $wc_query->max_num_pages+1):
to
if($current_page < $wc_query->max_num_pages):
Thread Starter
paul91
(@paul91)
Thank you for reply. I changed it but still doesn’t work althought this is proper solution for standard pagination. I described the problem in the last paragraph under source code. Now it’s visible on web.
Load More Products plugin replace default pagination with the button. No need to edit pagination in any case. More than that it is using links from default pagination so editing it can break Load More plugin functionality.
Right now it is broken. 3d page is loading forever. Just set there default pagination and it will be working
Thread Starter
paul91
(@paul91)
I am not sure what is default pagination in this case because it’s not product archive page. But I am pretty surre, that link to 3rd page is not broken. You can check my page, because now I canceled load more button plugin functionality.
I also tried code from woocommerce/template/loop/pagination.php:
<nav class="woocommerce-pagination">
<?php
echo paginate_links( apply_filters( 'woocommerce_pagination_args', array(
'base' => esc_url_raw( str_replace( 999999999, '%#%', remove_query_arg( 'add-to-cart', get_pagenum_link( 999999999, false ) ) ) ),
'format' => '',
'add_args' => false,
'current' => max( 1, get_query_var( 'paged' ) ),
'total' => $wp_query->max_num_pages,
'prev_text' => '←',
'next_text' => '→',
'type' => 'list',
'end_size' => 3,
'mid_size' => 3,
) ) );
?>
</nav>
Which shows links to 3 pages and also next and previous. When I link it to the Load More Products accoring to propper classed then pagination is completely hidden with display:none.
“Which shows links to 3 pages and also next and previous. When I link it to the Load More Products accoring to propper classed then pagination is completely hidden with display:none.” and the button is shown instead and loading next page with ajax. Yes, this is how it is working. Hiding woocommerce pagination with display:none and using its links to load next pages
Thread Starter
paul91
(@paul91)
This is ok. But load more button generated by plugin is also hidden. And it doesn’t work on click (if I set force display or by developpers tools in browser).
Thread Starter
paul91
(@paul91)
I finally solved it. The expected functionality for this plugin is that the pagination element is always exists and only next page link is missing on the last page but I completely ommited pagination on the last page.
-
This reply was modified 8 years, 8 months ago by
paul91.