WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
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 '13 at 22:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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