I did this as a workaround:
var initialLoad = 0;
function loadMorePort() {
if (initialLoad < 3) {
almTriggerClick();
}
}
window.almComplete = function(alm) {
initialLoad++;
setTimeout(function() {
loadMorePort();
}, 600);
};
I had to add the setTimeout as window.almComplete wouldn’t trigger almTriggerClick if called immediately. This works, but there is a slight delay and looks clunky 🙂
@swellbuilt You could use the Preloaded addon to load 9 posts, then use ALM to load 3 per click.
https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/
Or use a custom query before ALM and then offset="9" in the shortcode.
Hope that helps.
Ahh, ok cool. Looks like the preloaded add-on is a good option. If I purchase the Pro version for my dev URL, can I easily switch it to my live URL once I launch?
Hi @swellbuilt
Yes, you can easily switch. But also, if your dev domain follows a pattern it doesn’t count as an install.
https://connekthq.com/plugins/ajax-load-more/docs/faqs/#23
Hope that helps.
Helps a ton. Thank you for the quick response, and love the plug-in!