0

If I don't reset my cache before using the shop page, #038 appears in the URLs generated in the pagination links at the bottom of the page, and the pagination doesn't work (stays on the same first page of the shop).

Shop page URL: https://artmatch.ca/canadian-art-for-sale/

Pagination URL when functioning normally: https://artmatch.ca/canadian-art-for-sale/?product-page=2

Pagination URL when malfunctioning: https://artmatch.ca/canadian-art-for-sale/#038;product-page=2

I read through the solution below...

https://wordpress.stackexchange.com/questions/303297/paginate-link-generate-additional-038-whenever-my-url-have-multiple-query-stri?newreg=057cb19f489c435bb50775398523b6b3

... however my pagination.php file in woocommerce already has one of the solutions implemented for get_pagenum_link(), setting the second parameter to false for the $base code:

$base    = isset( $base ) ? $base : esc_url_raw( str_replace( 999999999, '%#%', remove_query_arg( 'add-to-cart', get_pagenum_link( 999999999, false ) ) ) );

Breaking my cache resolves this issue, temporarily. Image below of the source code for the generated pagination links when the issue is present.

enter image description here

1
  • 1
    If turning off the cache plugin cures the problem, and turning it back on causes the problem to come back, then it's an issue with the cache plugin. You'll need to contact the plugin's support team about this; third-party plugin support is off topic here.
    – Pat J
    Dec 18, 2023 at 16:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.