Also a bug with nested categories not displaying. Only topics within a primary category shows up.
See ex below: General but no General >> News and Events
and again with tiles and all other shortcode attributes removed..
Also a bug with nested categories not displaying. Only topics within a primary category shows up.
See ex below: General but no General >> News and Events
and again with tiles and all other shortcode attributes removed..
Hey Ryan, neither topic image previews or names are features of the plugin, however you can use these filters to apply your own formatting and to possibly add those elements in.
To override the HTML output entirely use these two filters (i.e. the add_filter equivalents)
// Return false to use your own formatting
apply_filters( 'wpds_use_plugin_topiclist_formatting', true );
// Return your own HTML output from the discourse_topics data
apply_filters( 'wpds_after_topiclist_formatting', $output, $discourse_topics, $args );
Or add additional elements into the existing HTML
apply_filters( 'wpds_topiclist_above_header', $output, $topic, $category, $poster_avatar_url, $args );
apply_filters( 'wpds_topiclist_above_footer', $output, $topic, $category, $poster_avatar_url, $args );
apply_filters( 'wpds_topiclist_avatar', $avatar_image, esc_url_raw( $poster_avatar_url ) );
apply_filters( 'wpds_topiclist_below_footer', $output, $topic, $category, $args );
Sorry do you mean the topic from a nested category is displaying, but not its category badge?
Many thanks, Angus. That is helpful.
Correct. If a topic resides in a nested category the badge will not display.. the screenshot below shows the missing badge. This is a topic within the General >> News and Events nested category. If I were to change the category of the topic to the parent ‘General’ category, the badge would display as the second topic below..
Thanks for clarifying Ryan, I’ll take a look at that issue next week and get back to you.
Thanks. FWIW, I added a “real name” attribute to replace usernames and posted my changes within this repo.. I’m pretty new to git so I apologize it didn’t follow the proper commit channels, but the changes are there if ever helpful to anyone else..
The big issue with this plugin still is the inabillity to include/exclude by category. In a private membership based forum you either see all the categories or you get none, which means there’s no way to exclude staff topics from being shown to the wider member base.
However, it seems like an easy workaround could be commenting out the ajax request and relying exclusively on the webhook. We have triggers setup to exclude the staff category in the webhook..
And this works to temporarily block new staff discussions until the ajax call is eventually made.
So maybe just comment out the ajax call?..
Am I overlooking something that would make this approach inadvisable?
Revisiting
I am happy to announce that the WP Discourse Shortcodes plugin now has support for the (experimental) topic list filter feature. ![]()
Next to source="latest" or source="top" you can now do source="filter" and put the filter query in the q parameter, like this
[discourse_topics source="filter" q="category:general,site-feedback"]
Don’t forget to enable the experimental_topics_filter setting first!
I’ve also fixed some bugs:
id attribute)The plugin is still not in the Wordpress plugin repository, so you should git clone it from the repo
cd wp-content/plugins
git clone https://github.com/communiteq/wp-discourse-shortcodes
or alternatively upload this ZIP file to install it.
wp-discourse-shortcodes-0.40.zip (67.6 KB)
This is huge! Thx for the great work, that opens up a whole new set of possibilities ![]()
Trying to follow along here, but can’t seem to find out if this is a current capability.
– I want to display RECENT POSTS across all/any category and topic. —
The info I’d want to display is:
Anyone know if this is possible?
The plugin uses what is provided by Discourse so please continue that question in the topic of your other post here.
A little late to the party here, but thank you!