• Hello, I have installed and running the plugin in a testing website environment, and it is running well except that seems to have a limit of posts to load, because after 25 posts loaded no more are loaded. There are more than 1000 posts published. But I can’t see how to get the loader show more and more.
    If in the queru I put ‘posts_per_page’ = -1, then ajax load more not run and all the post are loaded from the beginning. If I put posts_per_page=6 (for example), then the ajax load more is running, but stops after 25.

    <?php
    		$paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
    		$args_rest_of_posts = array(
    			'post__not_in' => $ids_used,
    			'posts_per_page' => -1,
    			'paged' => $paged
    		);
    $query_posts = new WP_Query( $args_rest_of_posts );

    The call to the plugin is:

    echo do_shortcode('[ajax_load_more post__not_in="'. $ids_used2 . '"]');

    Where $ids_used2 is a string with posts displayed before themain query that we dont’ want to repeat.

    Any help would be very appreciated.

    https://www.ads-software.com/plugins/ajax-load-more/

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

    (@dcooney)

    Hi nuriarai,
    You might have error in your repeater template. Can you post that?

    Also, instead of passing post__not_in="'. $ids_used2 . '" you could just use offest="6" where 6 is the number of previous posts.

    Let me know,

    Cheers,

    Thread Starter nuriarai

    (@nuriarai)

    Hello dcooney, I’m sorry for my delay, but I don’t received any notification about your answer.
    I just tried with your default code and the problem persist, so it not seems a repeater template problem. I think it is related with the total number of posts. If I try in my testing site that has only 40 posts there is no problem, but If I try in the client testing site that has 1000 posts then the problem appears. In a category page with 73 posts the loading stops in the 35 post.

    Any other idea?

    About the post__not_in, I need it because the posts in $ids_used2 array ar not just the 6 previous, they are from different post format (videos & anotation) and they could not be sequencially.

    Thanks,

    Plugin Author Darren Cooney

    (@dcooney)

    No worries.
    Is it possible to share a link to the site where the problem appears?

    TPDBrendan

    (@tpdbrendan)

    I’m having the same issue with it stopping at exactly 25 posts, but I’m using it without any particular arguments – just calling all posts. The blog I’m working on has over 450 posts, so I wonder if it’s related to size of database call.

    If I use the button option instead of the infinite scroll, I can still load more by manually clicking the button after each load past the first 25. That gets pretty tedious after a while, though, since it only seems to load a few at a time.

    • This reply was modified 8 years ago by TPDBrendan. Reason: forgot some info
    Plugin Author Darren Cooney

    (@dcooney)

    At @tpdbrendan,
    set max_pages=”0″ in your shortcode.

    Cheers,

    TPDBrendan

    (@tpdbrendan)

    Worked perfectly, thanks!

    I have same problem, it stop loading after 79 posts but i have total 144 posts to display
    My Shortcode is :
    [ajax_load_more post_type=”post” category=”box” orderby=”rand” posts_per_page=”16″ button_label=”Load More” container_type=”div” ]

    I used ajax to stop Repeating posts as per given solution in this :
    https://www.ads-software.com/support/topic/repeating-posts-in-random-order/

    using ajax i had set the value of data-post-in to display only that posts.

    Please check this screenshot for more information :
    https://prntscr.com/drps8d

    Thanks

    • This reply was modified 7 years, 10 months ago by sagypatel.
    Plugin Author Darren Cooney

    (@dcooney)

    Hi sagypatel,
    Please note that ordering by ‘rand’ is NOT supported with Ajax Load More.

    Thanks for reply,

    But order by “rand” working perfectly in this page :
    https://womenbeyondborders.net/boxes/

    The problem is only when i am use data-post-in or data-post-not-in in html code using ajax at that time all posts not display, only 80 posts are display there.

    In screenshot data-post-in have around 43 posts id, this all posts are not display on the page.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘not displaying all posts, stops after load 25 posts’ is closed to new replies.