I have this loop at the same it will count the output:
while ($wp_query->have_posts()) : $wp_query->the_post(); $current++; $current2++;
If I understand what you are asking here, I think you want to alternate your divs with'first' and 'second' classes?
As such, you can use the % modulo operator (see http://php.net/manual/en/internals2.opcodes.mod.php)
0 讨论(0) 查看其它4个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复