# Request - Wordpress plugin, Publish to Discourse option to include category

**URL:** https://meta.discourse.org/t/request-wordpress-plugin-publish-to-discourse-option-to-include-category/28174
**Category:** Feature
**Created:** [Avril 30, 2015, 10:49 UTC](https://meta.discourse.org/t/request-wordpress-plugin-publish-to-discourse-option-to-include-category/28174 "2015-04-30T22:49:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![PopsRocker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/popsrocker/32/41634_2.png) [@PopsRocker](https://meta.discourse.org/u/PopsRocker)
#### Post date: [Avril 30, 2015, 10:49 UTC](https://meta.discourse.org/t/request-wordpress-plugin-publish-to-discourse-option-to-include-category/28174/1 "2015-04-30T22:49:22Z")

</div>

First a question … does the Discourse Wordpress plugin allow for posts to be published to Discourse in more than one category?

The following post is old and possibly outdated, but is it still true in that Discourse only publishes to ONE category as defined in the plugin settings?

[https://meta.discourse.org/t/plugin-to-allow-choice-of-discourse-category/18853/11](https://meta.discourse.org/t/plugin-to-allow-choice-of-discourse-category/18853/11)

I noticed the Plugin structure is different since the post above, but I couldn’t tell if the current code (found in /lib/discourse.php) would allow for multiple categories.

… code snippet closest to a match with the above post (in /lib/discourse.php)

```
$category = $options['publish-category'];
if ( $category === '' ) {
  $categories = get_the_category();
  foreach ( $categories as $category ) {
    if ( in_category( $category->name, $postid ) ) {
      $category = $category->name;
      break;
    }
  }
}

```

The feature I would like to see is category options that can be selected near or below the checkbox option to publish to Discourse. These categories would match those found at the Discourse forums.

Until then, I’ll make do with manually switching the categories for now 🙂

Here’s a screenshot to clarify what I’m looking for.  
 ![](https://global.discourse-cdn.com/meta/original/3X/c/5/c5797b22df5a5f503ab57ddb1090bde3ff4c0776.png)

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [Mai 22, 2015, 12:55 UTC](https://meta.discourse.org/t/request-wordpress-plugin-publish-to-discourse-option-to-include-category/28174/2 "2015-05-22T12:55:12Z")

</div>

This has been solved in a new plugin, soon to be merged with the official wp-discourse.

> [@Modified wp-discourse to choose category per post](https://meta.discourse.org/t/modified-wp-discourse-to-choose-category-per-post/28883):
>
> With wp-discourse you can only select one discourse category in which your posts get published. In our context we have multiple categories we want to use and to be able to select that per post; blog posts to Blog, and product posts to Products. I modified wp-discourse to add the category drop down on the publish meta box, and used it as the published discourse category. I have my code on github, I think its a neat idea and I would like your feedback. Check it out: [GitHub - PaxInstruments/wp-d…](https://github.com/PaxInstruments/wp-discourse)

---

<div class="post-metadata">

### Author: ![charlespax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/charlespax/32/116157_2.png) [@charlespax](https://meta.discourse.org/u/charlespax)
#### Post date: [Mai 25, 2015, 7:53 UTC](https://meta.discourse.org/t/request-wordpress-plugin-publish-to-discourse-option-to-include-category/28174/3 "2015-05-25T07:53:42Z")

</div>

I believe a Discourse discussion can be in only one category at a time.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [Mai 25, 2015, 8:14 UTC](https://meta.discourse.org/t/request-wordpress-plugin-publish-to-discourse-option-to-include-category/28174/4 "2015-05-25T08:14:18Z")

</div>

Sure, if you need to cut through categories use tags.

We should consider allowing you to “pass tags” through from WordPress we have a strong use case for this on [boingboing.net](http://boingboing.net)

For example:

> **[If they'd given Commander Riker his own Star Trek spinoff show, it would not...](https://boingboing.net/2015/05/24/if-theyd-given-commander-rik.html)**
>
> They should have given the franchise to Jan van den Hemel. \[via The Verge\]

has the tags “edits riker star trek weird” it would be cool if

[If they'd given Commander Riker his own Star Trek spinoff show, it would not be as good as this - boing - Boing Boing BBS](http://bbs.boingboing.net/t/if-theyd-given-commander-riker-his-own-star-trek-spinoff-show-it-would-not-be-as-good-as-this/58208) had these tags as well.

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [Décembre 4, 2025, 11:35 UTC](https://meta.discourse.org/t/request-wordpress-plugin-publish-to-discourse-option-to-include-category/28174/5 "2025-12-04T11:35:53Z")

</div>


