Does the current WordPress plugin offer the ability to show on the home page of my site the most recent posts in our Discourse plugin? Is there an easy way to do this - similar to how we have a Twitter widget that shows the most recent X number of posts we’ve done in Twitter?
Visual mock of what you would like?
WordPress plugin will only affect your WordPress install, it does not touch the Discourse install except for posting data to it.
It ships no special widgets for adding a panel to the WordPress site.
I’d love to see something quite similar to the Twitter widget from a look and functionality perspective:
The above image is pulled from this example page:
It would be really helpful to pull people into the forums from the pages on the site, and since most of my pages on my site have a sidebar with too much white space - this would help me advertise the forums, and also convey the level of activity on the site - which otherwise is hard to convey.
It would be fairly easy to expose this as Discourse has a JSON API (which the whole forum runs on).
For example, this thread:
Want a category?
Sounds great - perhaps someone who is more software savvy than myself can do this and share it with the community - because its obviously something that anyone that is using Wordpress and Discourse is probably going to want to do.
You are able to customize how many comments to show, whether avatars should be shown, the avatar size, and excerpt length. The topic title and exact post (with a relative time) are linked in the output.
That exposes the latest topics I believe. Do you (or anyone) know if there is a URL for latest posts? Being able to filter by category would be nice too, if possible.
We don’t have a latest posts feed anywhere, we would need to add an endpoint for that.
Here is another example of how discussion threads could be added to wordpress web sites - this is an example from http://www.theverge.com. It would be great to have a wordpress widget that allowed us to easily add these to our wordpress pages / posts.
This is a clip from this page:
You should be able to do that by grabbing the RSS feed for latest using any RSS feed widget.
Here for example that feed is
I know this is an old topic but I was curious about this as well. I used the RSS feed widget with our site and got this:
It gets the job done but it’s not still not superb. I wonder if it has to do with our theme, but even with “show author if available” selected in the settings, you can’t see who wrote it. It’d be great if you could have the author and topic it was posted in. Polygon has a great example of that:
Is it hard for widgets to pull that information from Discourse, if we have the plugin where it replaces comments, it should be possible, right?
Well, the RSS does have author fields.
<author>firstname.lastname@example.org (@tobiaseigen Tobias Eigen)</author>
In terms of Discourse having author fields to be picked up? I realize that they have them, I just wonder if there’s a reason why RSS Widgets aren’t picking it up?
I tried another widget and enabled “show author” but no dice.
Also, I realized that when a staff member posts something into the staff section, it shows up on the RSS widget too, but not everyone is allowed to see it. And the “hide if” options don’t have any of the discourse categories.
I really do think this would be a worthwhile plugin if anyone was able to do it.
Hmm, the staff posts should not show up in RSS.
I just made some staff posts on http://try.discourse.org and I don’t see them in the RSS either as me or incognito:
Ah ha! It was because they were posted in a sub category of Staff and those permissions were set for everyone to be able to see it. I’ve changed that but it’s still viewable on the front end RSS widget. I’m assuming that’s because it was already posted with the previous settings.
If the cookies being sent with the request for latest.rss include authentication to read private topics, those private topics will be included. So, if you are, don’t include an api_key & api_username.
I put something together like this for my site. I’ll toss out the code if you or anyone wants to play around with it:
My code is kind of messy. I was originally trying to use AJAX but decided it wasn’t worth it.
Memory Usage and Blank Pages
Adam - can you give us a link to your site so we can see how it looks when its implemented?