• Resolved webinbox

    (@webinbox)


    Hello,

    is it possible to get two different behaviours on mobile and desktop? For example on mobile i want to have button load more that you need to click but on Desktop i want infinite scroll without button.

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

    (@dcooney)

    Hi @webinbox

    This isn’t possible out of the box with ALM but you could use wp_is_mobile to handle this by swapping shortcode params.

    $style  = wp_is_mobile() ? 'default' : 'infinite classic';
    $scroll = wp_is_mobile() ? 'false' : 'true';
    echo do_shortcode( '[ajax_load_more loading_style="' . $style . '" scroll="' . $scroll . '" post_type="post" posts_per_page="5"]' ) ;

    Let me know if this helps.

Viewing 1 replies (of 1 total)

The topic ‘Mobile and Desktop funcionality’ is closed to new replies.