# Question Answer Plugin

**URL:** https://meta.discourse.org/t/question-answer-plugin/56032
**Category:** Plugin
**Tags:** deprecated
**Created:** [January 19, 2017, 4:43pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032 "2017-01-19T16:43:47Z")
**Posts on this page:** 1
**Showing post:** 74

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [February 22, 2018, 12:36am UTC](https://meta.discourse.org/t/question-answer-plugin/56032/74 "2018-02-22T00:36:23Z")

</div>

I’ve never used the WP plugin before, but in theory the only thing you’d need to do to get a ‘read only’ version within Wordpress (i.e. you can’t vote, or clicking a ‘vote button’ would send you to the discourse topic itself) would be to customise the [WP comment template](https://meta.discourse.org/t/wp-discourse-template-customization/50754) to support the QA styles.

The key bits would be:

1 - If a topic has qa enabled and the post is not the first post, it’s a ‘comment’ if it’s a reply to a post and it’s an ‘answer’ if its not. This is the version of this logic in the Discourse client customisations in this plugin:

```plaintext
api.addPostClassesCallback((attrs) => {
  if (attrs.topic.qa_enabled && !attrs.firstPost) {
    return attrs.reply_to_post_number ? ["comment"] : ["answer"];
  };
});

```

2 - Display the property `topic.vote_count` alongside answers.

The posts should already be in the right order as this plugin changes the `sort_order` of posts in a topic, which should be respected regardless of what client is consuming the server endpoints (i.e. the Discourse client, or the Wordpress plugin).

---

_[View the full topic](https://meta.discourse.org/t/question-answer-plugin/56032)._
