Home › Forums › WoodMart support forum › Product Archive Page – Ajax Load More button issue /?_pjax=.main-page-wrapper
Product Archive Page – Ajax Load More button issue /?_pjax=.main-page-wrapper
- This topic has 11 replies, 2 voices, and was last updated 1 year, 9 months ago by Artem Temos.
-
AuthorPosts
-
January 29, 2023 at 2:11 pm #438709
fazhekParticipantHello from Croatia!
I am starting to switch from Elementor to your theme, and loving it so far. I just need to have some issues resolved in order to continue the switch.Whats the problem?
Category page reloads after clicking “Load More” button, and /?_pjax=.main-page-wrapper gets added at the end of the URL.
This happens only after coming from parent category page.
After the page reloads once, the Load more button will work normaly, but this is terrible experience for users.
Video demo: https://www.dropbox.com/s/qx7tut31xdr4xph/ajax%20load%20more%20issue.mp4?dl=0Steps to reproduce the problem?
1. Go directly to https://vhi6wzrv6g-staging.onrocket.site/kategorija/ribolovni-pribor/
2. Enter any subcategory (through the image or menu) with “Load more” button (eg. 1st in the list “ROLE ZA PECANJE”)
3. Click on “Load more” buttonSite details:
Hosting: staging site on rocket.net, php 8.1, 1gb ram
Plugins active: woocommerce, woodmart core
Theme: woodmart
Wordpress version: latestSteps I have tried to resolve the issue:
1. Activete and deactive child theme
2. Pull my hair out, yell on my kids
3. Change PHP version to 7.4 and 8.0
4. Clear cache many times: CDN, browser
5. Change browser: incognito firefox, chrome, edge
6. Reset all theme and header settings
7. Resave wordpress and woocommerce permalinks
8. Enable elementor plugin
9. Disable “Enable AJAX add to cart buttons on archives”
10. Deactivate plugin Woodmart core
11. Delete most of products
12. Remove menus
13. Remove category descriptions and imagesNotes:
No additional code is added to the theme.
If you need any additional info, let me know please.Wordpress and Woocommerce status reports shared in private content.
January 29, 2023 at 6:59 pm #438736
Artem TemosKeymasterHello,
To solve this problem try to go to Theme Settings -> Performance -> JS -> Advanced scripts controls -> Scripts always load and select “Product load more” from the list. Save the Settings and check how it works.
Kind Regards
January 29, 2023 at 7:10 pm #438742
fazhekParticipantHello and thank you for reply.
I have tried this, cleared cache, but the issue still remains.January 29, 2023 at 7:22 pm #438744
Artem TemosKeymasterSorry, add
Load more button
script as well and test how it works.January 29, 2023 at 7:35 pm #438746
fazhekParticipantThanks, that solved the issue!
Have a nice day.January 30, 2023 at 2:23 am #438792
fazhekParticipantAnother issue arised from this fix.
Steps to reproduce the problem?
1. Go directly to https://vhi6wzrv6g-staging.onrocket.site/kategorija/ribolovni-pribor/
2. Enter any subcategory (through the image or menu) with “Load more” button (eg. 1st in the list “ROLE ZA PECANJE”)
3. Click on “Load more” button once
4. Scroll down and “Load more” button is showing as “spinning” and can’t be clickedAlso the URL does not change /page after clicked on “Load more”
This happens only after coming from parent category page.
After the page refreshes, the Load more button will work normaly, but this is terrible experience for users.Also getting a few errors in the console. Providing screenshot.
Please don’t ask me to clear cache or some similar generic reply. I have again tried many things to resolve this, but I guess there is something messy with js in your theme.
Login details remained the same as from 1st post.Attachments:
You must be logged in to view attached files.January 30, 2023 at 11:26 am #438889
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to fix this https://gyazo.com/a2303a204fd0a6140cb8cf95004bdd99
wp_enqueue_script( 'imagesloaded' );
January 30, 2023 at 1:58 pm #438958
fazhekParticipantThis did not help. Issue remains the same.
Attachments:
You must be logged in to view attached files.January 30, 2023 at 4:22 pm #439009
Artem TemosKeymasterWe checked your staging website but don’t see the code added. Please, add the code on the staging so we can see how it works.
January 30, 2023 at 4:28 pm #439020
fazhekParticipantI added, tried and removed so I can continue my work. I have added it now again and left it.
January 30, 2023 at 4:32 pm #439021
fazhekParticipantIt seems the issue is not there anymore now after adding the code again. Not sure what happened.
Thanks for the support!January 30, 2023 at 4:51 pm #439028
Artem TemosKeymasterGreat, you are welcome!
-
AuthorPosts
Tagged: AJAX, category page, load more button
The topic ‘Product Archive Page – Ajax Load More button issue /?_pjax=.main-page-wrapper’ is closed to new replies.
- You must be logged in to create new topics. Login / Register