As you know, I am planning to start from scratch, which includes adding around 60,000 Q&A programmatically. Long back I wrote a raw script to add Q&A programmatically and posted on Anspress too –
But a lot has changed since then. I wanted to know what are different metas consumed when a question or answer is posted, and more importantly How to update those in a fast way(using hard coding)?
I know you had earlier suggested to some user “ap_save_question”
which is deprecated now. Then I read about “submit_question_form”
From here I got the basic idea. But it’s very difficult to reverse trace all the metas used by this function (and sub-functions). Also, there are parts which can Not be there when adding Q&A programmatically (such as redirect to newly posted Question).
So I need to make a new function, which will just add new question/answer and its metas.
For e.g, I have just striped a part (adding question programmatically) of script which I posted earlier –
Sorry, it seems I was not able to embed codes here, so added screenshot, for better understanding.
In the above e.g., I used wp_set_post_terms for adding category & tags.
Can this be used with current version of Anspress?
So far I can think of following metas, which are being used in posting Q&A –
- View counts
But, I am not sure how to use these in my script?
Please share your inputs regarding this.