February 04, 2015
if($post->have_posts()) { $i = 1; } while($post->have_posts()) { $post->the_post(); $i++; }
This will create a counting instance, that you can add inline to any elements that need intervals applied. Simple echo $i;
Sourced here.
if($post->have_posts()) { $i = 1; } while($post->have_posts()) { $post->the_post(); $i++; }
This will create a counting instance, that you can add inline to any elements that need intervals applied. Simple echo $i;
Sourced here.
I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.