Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

AvWijk on "Extra CSS class in last column (loading posts in loop)"

$
0
0

Probably a very easy question to solve:

I have a bootstrap framework with four columns, only thing is that the last column should have a class added 'column-last'. How do I do that?

Code is as follows

<?php if (have_posts()) : ?><?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("category_name=portfolio&paged=$paged&posts_per_page=4"); ?>
                             <?php while (have_posts()) : the_post(); ?>
								   <?php if (has_post_thumbnail( $post->ID ) ): ?>
                                         <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>

                                 <div class="percent-one-fourth box fadeIn"><div class="work-member"><a title="Roche Corporate Mobile Website"><img class="work-avatar tempfilter" src="<?php echo $image[0]; ?>" alt="<?php the_title() ?>" title="<?php the_title() ?>"/></a></div></div>
                                     <?php endif; ?>
                                     	<?php endwhile; else: ?>
                		<?php endif; ?>

Viewing all articles
Browse latest Browse all 8245

Trending Articles