WP-Discource not working on Custom Post Types


(John Arce) #1

I just noticed the plugin is not working on custom post type and also not posting on discourse

http://webgeek.ph/event/1st-philippines-techcamp-hackathon/ 

(Jeff Atwood) #2

I don’t think it’s designed to work on any other post types at the moment.


(Melbouy) #3

You could just edit the plugin itself, If you look on line #262 of wp-discousre.php you’ll see the following line:

 $allowed_post_types = array("post", "page");

Simply add your custom post types here to bring them “into the fold”.

Of course it’s very bad practice to directly edit a plugin so I’ve created a pull request here that begins to add this functionality.

Good luck!


(John Arce) #4

@melbouy Thanks! I copy your pull request and tested on my Wordpress.

still not posting on discourse for custom post type.

and I also notice I can only choose one post type.


(Melbouy) #5

@johnarce It’s a multi select so you can select more than one post type by holding down the command key (on mac, I’m not so sure of the equivalent on windows but It’s probably the control key).

Also, if you’re not seeing any effect you may need to re-install the plugin in order to get the disourse options to update.

Hope that helps?


(John Arce) #6

Yes Multi select is working but still not posting on discourse.

Will try it again soon. Thanks