[resolved] Post x of y (4 posts)

  1. ifelse
    Posted 10 years ago #

    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.


  2. vkaryl
    Posted 10 years ago #

    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?

  3. Kafkaesqui

    Posted 10 years ago #

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


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

  4. ifelse
    Posted 10 years ago #

    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:)

Topic Closed

This topic has been closed to new replies.

About this Topic