tehzoras
Forum Replies Created
-
Ok, I fixed it. I just changed to load more on scroll and it’s working as intended!
Thanks again for your support!
Is it fixed? I just updated to 2.12.0 and still the same problem for me…
ok, thank you!
“Similar, but I found that if a page initially loads with less posts than the Posts Per Page, .done is not added. It seems that the class is only added after a request for more is made.”
@dcooney
I think this is exactly my problem too.Unfortunately I am not :/
Still trying to figure out why it’s not working….When I keep clicking the load more button, and I reach the point that I have no other posts to load , then it’s disabled as it should be.
It’s only on the initial page loading (in a page with small number of post) that it’s not working, wierd
<?php $cat = get_category( get_query_var( 'cat' ) ); $category = $cat->slug; echo do_shortcode('[ajax_load_more post_type="custom_post" posts_per_page="3" order="ASC" orderby="title" transition_speed="500" pause="true" scroll="false" button_label="Load More" offset="3" category="'.$category.'"]'); ?>
I also post my shortcode, maybe it’s something wrong there
<div class="col-sm-4"> <div class="image"> <?php the_post_thumbnail(array(375, 375), array('class' => 'img-responsive')); ?> </div> <div class="caption"> <h2> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a> </h2> </div> </div>
Yeh the template was already the way you mentioned, I made a mistake above
<div class="col-sm-4"> <div class="image"> <?php the_post_thumbnail(array(375, 375), array('class' => 'img-responsive')); ?> </div> <div class="caption"> <h2> <a>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a> </h2> </div> </div>
Just found someone having the same problem and suggesting using this :
$.fn.almComplete = function(alm){
var count = $(‘.alm-reveal > div’).length;
if ( count < 8 ) {
$(‘#load-more’).hide();
}
};
(replace 8 with your “Posts Per Page” number)This didnt help also, the button is still there
My repeater template is working normally.
When I have a lot of posts , lets say 9 for example, 3 are displayed on page load then on first click 3 more , on second click 3 more and then the button is away.I have only problem on the first load of a page with less than 3 posts ??
So my functionality is like this:
I display 3 posts in the page originally and each time I click the button I display 3 more etc.
So my ‘posts_per_page’ => 3 and my shortcode for the button has offset=”3″ and posts_per_page=”3″.In some categories though I have a total number of 2 posts. This means the 2 posts are originally displayed and the button is still there although it has no more posts to load. And after I click it (and loading nothing) it goes away.
What I want to achieve is not having it there at all since there is no more content to load.
I hope I am clear enough