Home › Forums › WoodMart support forum › Pagination Issue when logged in
Pagination Issue when logged in
- This topic has 7 replies, 2 voices, and was last updated 4 years ago by Artem Temos.
-
AuthorPosts
-
December 25, 2020 at 12:39 am #253584
kingyParticipantHi,
No matter which Products pagination setting I use, if I’m logged in (as admin), the pagination options such as infinite scroll, go to page 2, or click to load more are not shown on the front end. All products are displayed on a single shop/category page instead!
If I check when not logged in for example in Incognito or another web browser, then they show and all is well.
I tried copying the link from another browser for page 2 of the shop: https://site.com/shop/page/2/ into my main browser whilst logged in and the page shows as a 404, but works when in incognito/another browser when not logged in.
It seems the woocommerce-pagination div in product-footer div is not loading whilst logged in?
If I log out and clear the cache, then it works, but then if I log back in and update a product, the problem comes back.
Any idea what the issue is?
December 25, 2020 at 6:58 am #253603
Artem TemosKeymasterHello,
Could you please disable all plugins that are not related to our theme and provide us your admin access so we could check it?
Thank you in advance
December 25, 2020 at 12:37 pm #253653
kingyParticipantAll deactivated. Details attached.
You’ll be able to see the issue by simply editing a product and clicking update, and then looking at the shop or category page(s) that contain products, as any pagination will be missing and all products will be displayed on the page even though max has been set to 12.
If you click the “show: 12” grid menu on the page then it works, but as soon as you update a product it seems to default to another number or something (like -1?) I assume, as pagination doesn’t shown then.
December 25, 2020 at 1:02 pm #253658
Artem TemosKeymasterPlease, send us your FTP access as well.
December 25, 2020 at 1:26 pm #253659
kingyParticipantOkay
December 25, 2020 at 3:13 pm #253673
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to fix this
function woodmart_products_per_page_action() { if ( isset( $_REQUEST['per_page'] ) && 1 != $_REQUEST['per_page'] && ! isset( $_REQUEST['_locale'] ) ) { setcookie( 'shop_per_page', intval( $_REQUEST['per_page'] ), 0, COOKIEPATH, COOKIE_DOMAIN, false, false ); } }
December 25, 2020 at 3:32 pm #253677
kingyParticipantThanks a lot, that fixed it! I assumed it was a cookie issue, too.
Is this something that will be resolved in the next theme update, so I can then remove the snippet?
December 27, 2020 at 7:30 am #253868
Artem TemosKeymasterYes, we will definitely fix this in our next theme update so you won’t need to keep the code.
Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register