Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
260 views
in Q2A Core by

There's already an Unanswered page: https://www.question2answer.org/qa/unanswered

Is there a way to show an Answered page which show all questions that have  chosen answer?

by
+1
by
Something similar to that, as it only list the recent ones. What lacking is it should have a paginated list of all answered questions.
by
+1
There is no available pages or built-in functions to list all the questions with answers. If you want so, you need to develop your own custom page.

Plenty of things to do: first, you need to create a custom page plugin https://docs.question2answer.org/plugins/modules-page/ . In the main content, you will need to do one or more  MySQL queries to pull the data in the qa_posts table. There are several built-in functions that you can adjust. Quite difficult if you look at those the first time. If you are comfortable with MySQL queries, it's much easier to proceed things.

Below is a simple way to get the answers I used, but you can also learn about other Q2A functions to list questions.

 $answers = qa_db_read_all_assoc(qa_db_query_sub('SELECT DISTINCT parentid FROM `qa_posts` WHERE type = "A"'));

Next step is to display data.

Pagination is a part of qa_content in your custom page, there is also a built-in function to do so.
by
I'm not into programming so I'll just probably go temporarily with your previous comment until someone develop it :)

Please log in or register to answer this question.

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.

Categories

...