Hi @yepecece,
Any chance you could share a link to the issue? I can’t replicate on my dev sites.
Cheers,
Hi @dcoone,
here is the link.
Number 4 is placed below 3.
Here is my shortcode:
[ajax_load_more id="press_list" container_type="ul" post_type="press" posts_per_page="3" meta_key="date_press" meta_value="" meta_compare="EXISTS" meta_type="DATE" order="ASC" orderby="meta_value_num" transition="masonry" masonry_selector=".grid-item" masonry_animation="slide-up" progress_bar="true" progress_bar_color="000000" button_label="Download more articles" button_loading_label="Loading articles..."]
if I add masonry_horizontalorder and set it to “true” or “false” it keeps the same order.
Thanks
Ok thanks for sharing.
The issue here is ALM enqueues Masonry from core WordPress and it’s loading an old version of Masonry (3.3.2) and horizontalOrder property was not added until 4.2. π
I’ll need to think about how to get around this because right now it’s nice that ALM can simply enqueue Masonry that is already present in the users build.
Thanks for the info.
When do you think a fix should be available?
I guess for right now is best for me to manually enable Masonry in order to get it working.
Cheers!
I actually tried to modify the plugin to see if it works with success.
I changed line 168 in the file class.alm-shortcode.php to this
wp_enqueue_script('masonry-script', get_template_directory_uri() . '/js/masonry.pkgd.min.js', array('jquery'));
The newer version loads correctly and the order is correct.
What would be the safest way to implement this without altering your plugin.
Thanks.
-
This reply was modified 8 years, 5 months ago by
yepecece.
Did you change the shortcode? When I looked it was set to false.
I just realised it was set to false.
I updated my comment.
What would be the safest way to implement this without altering your plugin.
Thanks.
FOr now you will have to do as you have done.
I need to read the Masonry license to see if I can bundle its into core ALM.