Using Masonry - How to make every Xth post thumbnail image span multiple columns?
To be specific:
- I'm using Masonry to show all posts within a certain category
- Thumbnail images for each post are shown on the category page in a 3-column format using CSS fluid width columns
- I need to show the 7th thumbnail image spanning the width of all 3 columns
In the past I've added a counter to posts to target the Xth post to apply a class and style accordingly. But is that possibly with Masonry, which is absolutely positioning elements?
EDIT
I'm using this code to query posts on the masonry page:
if ( get_query_var( 'paged' ) ) {
$paged = get_query_var( 'paged' );
} elseif ( get_query_var( 'page' ) ) {
$paged = get_query_var( 'page' );
} else {
$paged = 1;
}
$args = array(
'posts_per_page' = 12,
'paged' = $paged
);
// Override the primary post loop
query_posts( $args );