Hi there,
I am trying to implement a "Load more" button on a view that has 9 posts. I need the button to loads the rest of the posts when clicked. I know that this feature has been requested by many users & I would like to know the status of its development.
If it's still in the works, can you please help me figure out a way to achieve it using the infinite scroll? I wrote a button that scrolls down to the bottom of the page. I need to trigger infinite scroll when reaching a target div placed in the footer. So when the user clicks the button infinite scroll will be triggered by reaching the footer & will look like the button does load more.
I desperately need this "Load More" feature. Please let me know if there's an easier way to achieve it or fake it for now.
And one more thing, The wpv-post-previous-link [wpv-post-previous-link format="« %%LINK%%" link="Previous post: %%TITLE%%"] doesn't display although I have heaps of posts. Only the next post of the same shortcode works. Can you help me with that as well?
Cheers
I could fix the previous link shortcode issue. So ignore it.
How can I insert next/previous links to an image href?
<a href="[wpv-post-previous-link format="%%LINK%%"]"><img src="next.png" /></a>
Hello,
Q1) "Load more" button
You can use "next page link" shortcode [wpv-pager-next-page] as the Load More Button, for example, you can try these:
1) Create a view with "infinite scroll" feature:
https://toolset.com/documentation/user-guides/infinite-scrolling-in-views/
in section "Pagination and Sliders Settings", click button "Advanced options", option "Infinite scrolling tolerance, in pixels", fill a negative number "-500".
This will prevent "Infinite scrolling" from triggering by scrolling.
2) in section "Loop Editor", insert the next page link shortcode between
[/wpv-items-found] and [wpv-no-items-found], for example:
[/wpv-items-found]
[wpv-pager-next-page force="true"][wpml-string context="wpv-views"]Load More Button here ...[/wpml-string][/wpv-pager-next-page]
[wpv-no-items-found]
More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-pager-next-page
Q2) How can I insert next/previous links to an image href?
Yes, you can display an image in the next/previous links, for example:
[wpv-post-previous-link format="" %%LINK%%" link='<img src="<em><u>lien caché</u></em>">']
More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-previous-link
Hi Luo,
I'm having trouble with the "load more" button. Infinite scroll is still being triggered despite changing the scrolling tolerance to "-500".
Hello Luo,
This fix doesn't seem to work anymore as the previous respondent mentioned. I have tried setting the pixels to -500, -1000, -1500 but nothing has worked.
Thank you,
Joe
I'm having the same issue with the tolerance now, no value works.
Is there any other way of stopping the infinite scroll, please?