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


(Scott) #1

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?

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 :slight_smile:

Here’s a screenshot to clarify what I’m looking for.


(Erlend Sogge Heggen) #2

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


(Charlespax) #3

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


(Sam Saffron) #4

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

For example:

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 had these tags as well.