<?php

$query = new WP_Query( array(
'post_type' => 'artist',
'posts_per_page' => -1,
'post_status' => 'publish',
'orderby' => 'date', // be sure posts are ordered by date
'order' => 'DESC', // be sure order is descending
'fields' => 'ids' // get only post ids
));

global $post; // current post object

$i = array_search( $post->ID, $query->posts ) + 1; // add 1 because array are 0-based

echo "Number {$i}";?> of <?php $numposts = wp_count_posts('POST_TYPE'); echo $numposts->publish;

?>

 

ex. http://artistsofoldflorida.com/artists/addison-walter-c/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.