Posted By

chrisdpratt on 05/04/10


Tagged

wordpress count iteration loop


Versions (?)

Get Iteration Count in Wordpress Loop


 / Published in: PHP
 

  1. # Standard Wordpress loop:
  2. $count = $wp_query->current_post + 1;
  3.  
  4. # Custom loop using WP_Query:
  5. $count = $custom_query->current_post + 1;

Report this snippet  

You need to login to post a comment.