-
Ashley
Hi,
I’m trying to create a “View More” button that loads more posts with AJAX for a Portfolio page. However, I understand that GenerateBlocks only supports pagination by default.
On this page, I’m also using GenerateBlocks’ Tabs to display posts filtered by category. Each tab dynamically loads posts based on its category, so the “View More” button needs to work within each tab while maintaining the correct post query.
I also attempted to set up the Portfolio page as an archive to enable the Infinite Scroll and Load More button from Appearance > Customize > Layout > Blog, but I encountered a message stating:
“This page is using a Loop Template Element. Other options can be found within that Element.”If I switch the Element type to Content Template, it results in duplicated posts, which I assume is due to the Query Loop.
I’ve been working on a custom View More button using JavaScript — it seems doable, but I haven’t fully gotten it to work yet. Does your team have any recommended workarounds for this?
Thanks!
-
Alvind
Hi there,
The Infinite Scroll feature is only functional with the theme’s default archive template. If you’re using a Loop Template element, it is not currently supported, though we are working on adding compatibility.
The V2 Query Loop block includes an Instant Pagination feature, which dynamically loads the next set of posts via AJAX without a full page reload. However, this method still relies on traditional pagination and may not fully meet your requirements.
As an alternative, you may need to implement a third-party plugin or a custom JavaScript solution, but that falls outside our support scope.
-
Stefanie
Hi Ashley,
I came across your post here while searching.On this page, I’m also using GenerateBlocks’ Tabs to display posts filtered by category. Each tab dynamically loads posts based on its category
I’m looking for a function like this.
Can you describe how you managed to do this?Thank you!!
-
I guess manually set cateogry for the query block in each of the tabs.
- You must be logged in to reply to this topic.