• Dear developers,

    I want to create infinite scroll in post. I have created this shortcode [ajax_load_more post_type=”post” progress_bar=”true” progress_bar_color=”be132d”] and I know how to use the do_shortcode fucntion, but I don’t know which file should I add this code to.

    Thank you for your help.

    The page I need help with: [log in to see the link]

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

    (@dcooney)

    Hi @kghugo2000,
    If you want ALM on this page, you would need to modify your single post (single.php) template.

    Let me know if this helps.

    Thread Starter kghugo2000

    (@kghugo2000)

    Thank you for your help! I have added the code into the single.php and it shows correctly on the post.

    However, no post is loaded other than the loading icon. What may be the possible problem?

    The code I am adding to the single.php

    <?php echo do_shortcode( ‘[ajax_load_more id=”8844275299″ post_type=”post” author=”1″ progress_bar=”true” progress_bar_color=”be132d”]’ ); ?>

    Thank you for reading.

    Thread Starter kghugo2000

    (@kghugo2000)

    An update on the situation: The infinite scroll is working on mobile( I used chrome to test it) but not on desktop. What may be the possible problem?

    Also, it is possible to load a post instead of the excerpt of a post after reaching the end of a page? I guess this setting is available but I can’t find it.

    Thank you for your help and your effort in building such a good plugin.

    Plugin Author Darren Cooney

    (@dcooney)

    @kghugo2000

    Also, it is possible to load a post instead of the excerpt of a post after reaching the end of a page? I guess this setting is available but I can’t find it.

    Yes, update the Repeater Template to the_content() instead of the_excerpt().

    The infinite scroll is working on mobile( I used chrome to test it) but not on desktop. What may be the possible problem?

    Im not sure, might be a scroll_distance issue. Can you share a link?

    Thread Starter kghugo2000

    (@kghugo2000)

    Thank you for your reply.

    I have updated the scroll-distance to an extreme value, 10000( I assume it means the screen distance needed for the infinite scroll to be triggered). The progress bar did load up on PC, but nothing load up afterward.

    For the content issue, after replace the_excerpt with the_content, no post can be loaded up and it is all blank. For the purpose of checking the issue on scroll-distance, I remain the setting the_excerpt now.

    Link: https://howtostudycantonese.com/unit-5-lesson-7-superlative-adjective%EF%BC%88%E6%9C%80%EF%BC%89/

    Thank you for reading and your help.

    Plugin Author Darren Cooney

    (@dcooney)

    Try setting scroll_distance="-1000" so it triggers early.

    You might have another issue though, so if you can share a link that would be good.

    Thread Starter kghugo2000

    (@kghugo2000)

    I have now set it -1000, but then the progress bar doesn’t even load up.

    Are you looking for the link of my website? I think I have shared it already in my last reply.

    https://howtostudycantonese.com/unit-5-lesson-7-superlative-adjective%EF%BC%88%E6%9C%80%EF%BC%89/

    Thank you for reading and your help.

    Plugin Author Darren Cooney

    (@dcooney)

    Ok thanks.
    It’s working for me. Your server is very slow though.

    Thread Starter kghugo2000

    (@kghugo2000)

    You mean you can load up the excerpt on desktop? I tried with different browsers but still it cannot be viewed.

    For slow, do you mean slow in loading page time or slow in loading next post in infinite scroll? Where did you access my site from?

    Thank you for reading and I hope the issue can be sovled

    Plugin Author Darren Cooney

    (@dcooney)

    You posted a link to your site in the original post.

    Thread Starter kghugo2000

    (@kghugo2000)

    Dear dcooney,

    Thank you for your help and I am trying to solve the issue again. The infinite scroll can be triggered even I have set it as the default, however it can only load up excerpt but not the content. The bottom of the page will be blanked if I have replaced the_excerpt() with the_content(). Can you check for me again and see what went wrong there?

    A link for your inspection: https://www.staging2.howtostudycantonese.com/u7l2-%E5%A5%BD-as-an-auxiliary-verb/

    Thank you for reading and your help.

    Yours sincerely,
    Hugo Sum

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Infinite scroll in post’ is closed to new replies.