I'm creating a site similar to http://thegreatdiscontent.com/ in that there's a bunch of posts on the site, and only one post gets shown per page.

I want to add a counter that says something like: "Issue #210" at the top of each post, as they have done with http://alistapart.com/. This would increment with each new post.

I've seen it out there to use wp_query->current_post, but that only works when you run through a loop. I'm only showing one post per page, so wp_query always returns 0.

Any ideas how I can make my posts increment?


1 Answer 1


The one persistent numerical thing about post is ID, however it is sequential for all posts, so you will have gaps if using it.

It would be easiest to assign a number and store it in custom field on post creation. Probably take it from an option and increment it there, so that your numbering doesn't shift if you delete a post and such.

  • Good call. In the time it would take me to add this custom field every week or two, it would be no big deal. Good advice.
    – saltcod
    Jun 13, 2013 at 22:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.