Support » Fixing WordPress » Post x of y

  • Resolved ifelse

    (@ifelse)


    This is probably an obvious/silly question but does anyone know how to display the following for a given post: post x of y

    i.e. Say you have 7 posts in the system; For the 1st post, post 1 of 7 will be outputted and for the 2nd post, post 2 of 7 will be outputted etc…

    BTW, as a further note, post-id cannot be used i.e. it has to be the real item number and the not the allocated post id.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I *think* there’s some sort of “common” php variable for this…. however, I am NOT a code-monkey. Maybe try one of the php lists?

    I have a plugin hanging around which calculates the numeric value of a post based on all published posts, listed chronologically:

    http://wordpress.org/support/topic/32852#post-185880

    It could be modified to display the full post count with it as well.

    Thanks Kafkaesqui! I was actually hoping that there was a WP built-in so that I wouldn’t need to reinvent the wheel and start writing code. However, I wasn’t expecting that you’ve gone ahead and done so already:)

    Nice use of array_flip BTW:)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post x of y’ is closed to new replies.