Extending the discussion_topics shortcode

You can add some more parameters to your [discussion_topics] shortcode in the Pro version.

[discussion_topics orderby="freshness" order="DESC" cols="avatar,topic,replies,voices,freshness" categories="4,9"]

You can use freshness in the orderby parameter to order your topics according to how recently they were updated – either posted or commented on.

You can add freshness to the cols parameter to include freshness in the table of topics.

You can also specify which categories to list by specifying the term_id for the categories in a comma-separated list. You can find the term_id by going to your dashboard then Topics > Topic Categories and hovering over the category you wish to include. The term_id is revealed in the URL.

Remember: you might need to enable categories in Discussion Board > Settings > Categories.

Author: Gareth

I make themes and plugins for WordPress

Leave a Reply