Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter danneniko

    (@danneniko)

    Solved like this:

    <?php if($alm_loop_count == (($alm_loop_count-1) % 3 == 0)) {echo '<div class="row">';} ?>
    <div class="entry-content col-xs-6 col-lg-4 alm-repeater-template page-<?php echo $alm_page; ?>">
    	<?php if ( has_post_thumbnail() ) : ?>
    		<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    	    	<?php the_post_thumbnail(); ?>
    		</a>
    	<?php
    	endif;
    	?>
    
    	<div class="entry-titles">
    		<?php the_title( sprintf( '<a href="%s" rel="bookmark" class="entry-title">', esc_url( 		get_permalink() ) ), '</a>' ); ?>
    	</div>
    </div>
    <?php if($alm_loop_count % 3 == 0 ) {echo '</div>'; } ?>

    really helpful, thanks

    Hi, I’ve tried this and it works perfectly with the wrap, however it stops the actual “load more” working, I’ve set the inital display to 16 using the shortcode

    <?php
    echo do_shortcode('[ajax_load_more post_type="cc_porfolio" taxonomy="portfolio_cat" taxonomy_terms="'.$term->slug.'" button_label="loading" posts_per_page="8" order="ASC" orderby="menu_order"]');
    ?>

    Cant figure this out at all, any ideas musch appreciated

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wrapping each 3 posts inside a div’ is closed to new replies.