Post loop counter over pagination

You can display posts loop counter by using following action hooks

add_action('post_grid_loop', 'post_grid_loop_count', 0);

function post_grid_loop_count($args){

$loop_count = isset($args['loop_count']) ? $args['loop_count'] : '';
$paged = isset($args['paged']) ? $args['paged'] : '';
$posts_per_page = isset($args['posts_per_page']) ? $args['posts_per_page'] : '';

$loop_count_start = ($paged-1)*$posts_per_page;
$loop_count_start = $loop_count_start +1;

$loop_count = $loop_count_start+$loop_count;

echo '<div>'.$loop_count.'</div>';

}

 

View post on imgur.com