The community member is having trouble modifying variables, specifically how to increment a variable called "firstPosts". The comments indicate that variables are mostly static at the moment, and cannot be updated once set. However, resource variables can be updated by changing the remote data. The community members discuss alternative ways to manage pagination, such as using search parameters or the pagination feature in a WordPress template. One community member suggests against using a "load more" feature, as it is not the best approach for displaying posts.
Hello everyone. after many hours of experimenting, I must have missed something in the use of variables. I don't see how to modify a variable. If I create a number variable 'firstPosts', how do I increment this variable. In this example, with a pagination from two to two, I would set this variable by incrementing by 2 Thanks for your help !
In other words, Variables in the current stage can not be updated once they are set. Resource variables can be updated by changing the remote data, but not the variable itself.
Yes. I use system.search.limit .In expression editor I add "+" before system.search.limit to use it as number. It works fine except for scroll positiona https://webstudio.wex.academy/blog/
Thank you for your answer. I saw this template but I 'm looking for a load more feature. I use limit as value for first query parameter in graphql. Perhaps there is an easier way
I wouldnt use load more. For starters when more load, you're really just loading all of them again, its not like the new 10 are inserting in addition the previous 10.
And it's best to show lots of posts on one page. Google and visitors prefer less navigation