I have this loop at the same it will count the output:
while ($wp_query->have_posts()) : $wp_query->the_post(); $current++; $current2++;
So you could use mod - best to use the full tag for WordPress if that is what it is.
mod
tag for WordPress if that is what it is.
php test if number is odd or even
// set up the html clips if($current % 2 == 0){ $html_clips = 'first'; }else{ $html_clips = 'second'; } if($current == 0) $html_clips = 'first'; 0 讨论(0) 查看其它4个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复