• Resolved yepecece

    (@yepecece)


    Hello,

    I am having trouble with a shortcode parameter.
    For some reason, it seems masonry_horizontalorder is not working.
    I set it up to true and order keeps using top space available to order items.

    Thanks for your help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Hi @yepecece,
    Any chance you could share a link to the issue? I can’t replicate on my dev sites.

    Cheers,

    Thread Starter yepecece

    (@yepecece)

    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

    Plugin Author Darren Cooney

    (@dcooney)

    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.

    Thread Starter yepecece

    (@yepecece)

    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!

    Thread Starter yepecece

    (@yepecece)

    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.
    Plugin Author Darren Cooney

    (@dcooney)

    Did you change the shortcode? When I looked it was set to false.

    Thread Starter yepecece

    (@yepecece)

    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.

    Plugin Author Darren Cooney

    (@dcooney)

    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.

    Thread Starter yepecece

    (@yepecece)

    Thanks for your help.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘masonry_horizontalorder not working’ is closed to new replies.