@jorgonfla
ALM comes with Masonry built-in, you’ll just need to add your class as normal and add the masonry related shortcode parameters as seen in the link below.
https://connekthq.com/plugins/ajax-load-more/examples/masonry/
As far as the sliders, what have you tried that is not working?
Did you write custom JavaScript to initiate the sliders with each Ajax load as mentioned in the support post from a few years back?
In that previous post a couple of years ago you mentioned a javascript function looking like this:
jQuery(function($) {
$.fn.almComplete = function(alm){
$(‘.flexslider’, alm.el).flexslider({
animation: “slide”
});
};
});
So I created a file named alm.js, put that code in it and gave the absolute path to it and the path to flexslider as well
<script src=”https://fashion.themembershipcentral.com/wp-content/plugins/ml-slider/assets/sliders/flexslider/jquery.flexslider.min.js”></script>
<script src=”https://fashion.themembershipcentral.com/wp-content/themes/cutewp/alm_templates/alm.js”></script>
I called them pretty much in any place imaginable in the template (which is the template of my grid) and they do not return errors but do not work either. Just the first image of each slideshow shows, but the Ajax Load More plugin strips the javascript from them and the class to call them.
For instance:
on the working one I have <div id=”metaslider_9726″ class”flexslider”>
and in the one with Ajax Load More running I have only <div id=”metaslider_9726>==$0
So I am guessing I cannot call a function for flexslider when in the Ajax Load More version of it it is not even mentioned.
I will try to do masonry and css from your plugin instead of using the grid template file and see if I get a better result. My guess is something is getting lost using the file from my theme and applying it to your default template.
If this and the css for masonry are something very simple for you to fix just give me a quote to fix them. I am at my limit of knowledge about this and I do not have the time to fight it. That site is my business and I can’t start advertising until I get the infinite scroll running.
I’m sorry but I’m not sure what you’ve tried and what is not working.
You wouldn’t load the flexslider script file in the callback. It would load in your page footer/header.
Here is the updated callback function, it changed two years ago.
https://connekthq.com/plugins/ajax-load-more/docs/callback-functions/#complete
window.almComplete = function(alm){
$('.flexslider', alm.el).flexslider({
animation: “slide”
});
}
I have been looking a little bit deeper into this issue and first, the callback did nothing.
But as I look into the structure and the changes from the original post excerpt to what the ajax load renders I can see it turns the slideshow (flexslider) of each post and the slides into aria-live (accessibility features). It keeps just the first slide with a link but renders the rest of the slides as plain slides (whereas with the actual slider each slide had a link).
And it removes the controls and it does not do auto-play.
So somewhere in your script or in ajax, the shortcode for the flexslider is read, the javascript actually runs and the slideshow is changed into aria-live, it loses the arrows for prev and next and it loses the autoplay and change of slide and fade timing instructions.
I do not want to have aria-live in my slides (that would probably do an audible read of the caption of the image or something like that).
Where is that conversion to aria located? how can I disable that?
So the issue is not calling back each time ajax loads content a slider, apparently the slider is called on each post, it is just that it is changed to a completely different type of slider and it is disabled.