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?
Thanks!
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.