• Resolved Wayne

    (@waynep16)


    We have set scroll=”false” but our list is just loading non stop on scroll.

    Here is how I am using the shortcode here https://www.moneyboxapp.com/learn/saving/articles/uk-savings-week-tips-to-grow-your-wealth/#ajax-load-more (bottom of the artcile we show more , it used to show a load more button but now just infintly scrolls)

    But the scroll false is not taking effect

    echo do_shortcode(

        '[ajax_load_more

            posts_per_page="2"

            taxonomy="learn"

            scroll="false"

            button_loading_label="Loading..."

            button_label="More posts"

            post_type="learning-hub"

            taxonomy_terms="' . implode(",", $term_array) . '"

            post__not_in="' . $post->ID . '"

        ]'


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

    (@dcooney)

    Hi @waynep16
    I can see in the generated markup that data-scroll=”false” is not being added.

    I’ve tested 3 instances locally and live and it’s working as expected.

    Can you try this code.
    echo do_shortcode( '[ajax_load_more posts_per_page="2" scroll="false" button_label="More posts" post_type="learning-hub" taxonomy="learn" taxonomy_terms="' . implode( ',', $term_array ) . '" post__not_in="' . $post->ID . '"]' );

    Thread Starter Wayne

    (@waynep16)

    This didn’t work 🙁 Code is definitely in place. Here is the full code

    https://gist.github.com/go6media/b1b7aebad96270322c2c2ef866f9ec29

    and a link to a post where this code is excluding cache

    https://www.moneyboxapp.com/learn/saving/from-the-experts/autumn-budget-2025-our-breakdown?nowprocket

    Any other ideas?

    Plugin Author Darren Cooney

    (@dcooney)

    @waynep16 I think the issue is the loading style. You’ve selected an Infinite Scrolling style which sets scrolling to true in the backend code.

    You can set [ajax_load_more loading_style=”default”] or set this in the Ajax Load More global settings.

    Hope that helps.

    Thread Starter Wayne

    (@waynep16)

    I have added this to the code and confirmed the global settings also has load more OFF but still the shortcode renders with infinite scrolling.

    Thread Starter Wayne

    (@waynep16)

    I think I have it working now…. The scroll false needed to be last in the shortcode call
    eg

    echo do_shortcode(
    '[ajax_load_more
    button_label="More posts"
    post_type="learning-hub"
    taxonomy="learn"
    taxonomy_terms="' . implode( ',', $term_array ) . '"
    post__not_in="' . $post->ID . '"
    loading_style="default"
    posts_per_page="2"
    scroll="false"
    ]'
    );
    Plugin Author Darren Cooney

    (@dcooney)

    Interesting, I can’t replicate the scroll in a different position. No matter where it’s placed in my tests works.

    Glad to hear this is resolved for you.

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

You must be logged in to reply to this topic.