• Resolved taeyongkim95

    (@taeyongkim95)


    So instead of pulling the content from the post, it decides to iterate through all the posts from the latest to the oldest.

    <?php
    /**
    * The Template for displaying all single posts
    *
    */

    get_header();

    // Start the Loop.
    while ( have_posts() ) : the_post();
    ?>

    <div class=”c-memos-single-container”>
    /public/images/pink-wave.png”></img>

    <div class=”o-memos-single-nav”>
    <div class=”o-memos-single-nav-previous-btn single-nav-btn”> < PREVIOUS </div>
    <div class=”o-memos-single-nav-search-btn single-nav-btn”> << BACK TO SEARCH </div>
    </div>

    <div class=”o-memo”>
    <?php echo do_shortcode(‘[ajax_load_more posts_per_page=”1″]’);?>
    </div>

    </div><!–.c-memos-single-container–>

    <?php endwhile;

    get_footer();

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

    (@dcooney)

    Hi @taeyongkim95 no worries.
    What is this code you are sharing? How does this relate to Ajax Load More?

    Thread Starter taeyongkim95

    (@taeyongkim95)

    @dcooney

    hey this is the code I have on my single.php file

    Plugin Author Darren Cooney

    (@dcooney)

    Ok thanks.
    So what do you expect to happen with this code?

    I notice you are using the default shortcode without any additional ordering parameters. By default Ajax Load More loads posts in chronological order starting from the newest post.

    Also, you are using this on a single template and Without the Single Post addon Ajax Load More will not pull the current post. It’s just going to list posts by date.

    Thread Starter taeyongkim95

    (@taeyongkim95)

    @dcooney I want it to be pulling the current post and then continue to load the other posts as the user scrolls. That’s weird because I’d used the default shortcode in another website and it seemed to be working fine. Is there a specific parameter or ordering that I have to set?

    So if I want the plugin to pull the current post AND update its url according which post it’s going through. Which addon would meet those needs?

    Plugin Author Darren Cooney

    (@dcooney)

    That is strange. Maybe the other site had some other configurations.

    Here is the addon.
    https://connekthq.com/plugins/ajax-load-more/add-ons/single-posts/

    Notice the implementation section for how to get it working. It’s the same sort of idea as you currently have but the shortcode is different.

    Hope this helps.

    Thread Starter taeyongkim95

    (@taeyongkim95)

    Now works as intended, thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Ajax Load More isn’t pulling in the correct post information’ is closed to new replies.