Each question taking or skipping 3 posts ids?

3.96K viewsIssues
0

Hello,

I see, that each and answer acts like a post in backend. But when i’ve created a question if the post id is 34, without any postings, just for test purpose, if i post the answer after asked that question, that answer post id will be like 37, instead of 35.

Why it’s like that? It’s same happening for every question, every question is taking up 3 post ids.

Please let me know what’s happening.

Regards

1

Its due to draft, revision which WP create under the hood.

Can’t we just remove that? Regular wp don’t do like that, right? How big we can make a site with anspress? Is there any big site running with anspress? Can it handle few hundred thousand questions and answers? If we can manage server things well?

Yes. WordPress always do the same with any type of posts. Regular and custom posts. It create draft versions, so you never will have consecutives id’s when creating posts or questions.

In my case, when in my site a question is created, always add to title the question number, that is given by: ap_total_published_questions() + 1

You can use this to save it on a custom field if you need it.