Hi,
It’s just an observation, I don’t know if it would be useful for others – The word “commented/answer/question” in activities can be hyperlinked to respective post, so if there are multiple answers/comments, one can directly see the latest post(comment/answer).
P.S. – I know we can sort answers as Newest First.
Regards,
Please help, the single page is displaying only the text of the question, without any othe anspress theme details.
_https://rosadonna.ru/consultation/question/kak-borot-sya-s-neuverennost-yu/
Hi,
There are following 2 bugs/issues present in Askbug v3.1.3 (I don’t know if these are appearing for me only, as no one else has reported it).
Fatal error: Call to undefined function ap_post_comments() in /<–my site–>/wp-content/themes/askbug/anspress/single-question.php on line 101

Fatal error: Call to undefined function is_ap_user() in /<–my site–>/wp-content/themes/askbug/templates/anspress.php on line 13

Only fix, I was able to do that to temporarily remove checking both functions from their respective places.
Kindly look into this.
AnsPress v4.1.1
Thanks.
Regards,
Atul
Hi,
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 –
https://anspress.io/questions/question/tutorial-how-to-import-questions-and-answers-to-anspress/
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”
https://anspress.io/resources/functions/ap_save_question/
which is deprecated now. Then I read about “submit_question_form”
https://anspress.io/resources/methods/ap_form_hooks-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 –
https://gist.github.com/atultiwari/f99656c899d0f1faef9125d6b0db098c

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 –
- Category
- Tags
- Activities
- View counts
- Timestamp
But, I am not sure how to use these in my script?
Please share your inputs regarding this.
Thanks.
Regards,
Atul