Adding Column Classes Functions Not Working
-
Hi there,
I wanted to split the results into columns. I have see your code here: http://www.billerickson.net/code/add-column-classes-to-display-posts-shortcodes/ and I am using Genesis, so I have the correct style sheet. However, your code doesn’t seem to work, as each listing simply adds “first” to every div class (the div class becomes: <div class=”listing-item one-third first”>), so that each listing is cleared (clear:both). For some reason your if statement:
if( 0 == $listing->current_post || 0 == $listing->current_post % 3 )
$classes[] = ‘first’;Always returns true and adds first to ever div class in the list.
Any ideas what’s going here?
The topic ‘Adding Column Classes Functions Not Working’ is closed to new replies.