WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Post x of y (4 posts)

  1. ifelse
    Member
    Posted 8 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.

    Thanks.

  2. vkaryl
    Member
    Posted 8 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 8 years ago #

    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.

  4. ifelse
    Member
    Posted 8 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