SFgirl55
Forum Replies Created
-
Okay – thanks!
Ah ok. So then there’s no way to have a clearing element between every 3 posts…?
Weird – I see 5 posts on the page I posted previously.
Here is an archive page where I see 1 post returned (and hopefully you do too): https://artofchange.is/author/darren-walker/Repeater Template:
<span class="ajax-divider"></span> <div class="block"> <?php if ( has_post_thumbnail() ) { $class = "image-post"; } else { $class = 'text-post'; } ?> <div class="post <?php echo $class; ?> <?php the_field('primary_category'); ?>"> <a href="<?php the_permalink(); ?>"> <?php if ( has_post_thumbnail() ) { ?> <div class="img-holder"> <?php the_post_thumbnail('list-thumb'); ?> </div> <div class="article-detail"> <h3><?php the_title(); ?></h3> <?php } else { ?> <div class="title"> <h1><?php the_title(); ?></h1> </div> <div class="article-detail"> <?php } ?> <div class="byline"> <?php $authorbox = get_field('show_author_box'); if($authorbox == 'yes'){ ?> <span>POSTED BY</span> <?php the_author_meta('display_name'); ?> <?php } else { ?> <span>POSTED VIA</span> <?php the_field('source_attribution'); ?> <?php } ?>| <?php the_time('F j, Y') ?></div> <div class="excerpt"> <?php echo get_the_excerpt(); ?> </div> <div class="postedin">—<br> <span>POSTED IN: </span><?php the_category(', '); ?> </div> </div> </a> </div> </div>
Shortcode:
echo do_shortcode('[ajax_load_more post_type="post" author="'.$author.'" posts_per_page="9" offset="9" pause="true" scroll="false" button_label="view more posts"]');
Thanks!
Ok I think I understand – on the initial page load, if there are less posts returned than the query’s posts per page param, the short code will still display a load more button until it is clicked, at which point if there’s nothing to return it gets the “done” class. I just wrapped the shortcode in a conditional checking post count against posts per page. Thanks for your prompt responses and great plugin.
Hi dcooney,
Sorry about that – more content was added since I posted. And you’re right it is working! However, I have another instance of the plugin in the category pages and I’m seeing the same behavior I previously described, for instance: https://artofchange.is/category/freedom/ and the shortcode is:echo do_shortcode('[ajax_load_more post_type="post" category="'.$category.'" posts_per_page="9" offset="9" pause="true" scroll="false" button_label="view more posts"]');
Forum: Plugins
In reply to: [Instapress] [Plugin: Instapress] Conflict with jquery cycleI ended up using this plugin instead and everything worked fine, but thanks for the heads up on disabling effects.