Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I know this has been answered at least a couple of times already and there is an answer out there from alchymyth2010 but I am looking for a different solution if possible because I have a fairly big wordpress site, around 30,000 posts and the code from http://wordpress.org/support/topic/display-sequential-post-numbercount-not-post-id makes wordpress hang and eventually times out for some reason. Actually I suspect it hangs because is trying to update all the posts in the db and that takes time. Anyway I am not a PHP aficionado but any kind of help would be great

share|improve this question
1  
Why not use post ID? Could you elaborate what your needs for it are, which matters for how to best implement it? –  Rarst May 12 '13 at 14:31
    
It sounds like you are asking for sequential post IDs. That is not going to be easy or straightforward, and is not likely to be "server load friendly" because of the fundamental structure of the WordPress database. Please explain the end result-- what you want to do. There may be another way that would work. –  s_ha_dum May 12 '13 at 14:38
    
There is probably a solution that does not require changing the database. Instead of explaining what you want to do in the database, explain what the experience is like for the user. –  Charles Clarkson May 12 '13 at 16:43
    
I don't know if sequential post ID would really work, is more like a counter I say. I have an image gallery where every image links to a post basically and I just want to have some sort of numbering system in place. Now, I tried the solution from the above link but I cannot even publish a new post anymore and I assumed it's hanging due to DB queries but I might be mistaken, for me is just doesn't work. –  jore May 12 '13 at 16:57
    
User don't interact with the number in any way, I just want that everytime I publish a post to get a contiguous number to my post that I can style and use it in my gallery for that particular post. It would be nice to be able to update the sequence everytime you delete the post or edit it but that would put some load on my server and I am trying to avoid it as much as possible. I was looking into mysql triggers as well at some point but I got into muddy waters I gave up. Any ideas? –  jore May 12 '13 at 17:04

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.