gdkob_topics
This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!
This shortcode is used to display a list of the Reference Topics taxonomy terms.
Attributes
Shortcode has several attributes:
- class: additional CSS class name to add
- sort_column: column to use for sorting the list of terms. The default is ‘t.name’.
- sort_order: order for sorting: ‘ASC’ or ‘DESC’. The default is ‘ASC’.
- show_counts: show number of posts for each term. The default is ‘yes’.
- cached: cache the results for the number of hours. The default is 24.
Sort Column
Sort column supports following values:
- t.name: term name
- t.term_id: term ID
- t.slug: term slug name
- tt.count: posts count
Example
Shortcode:
[gdkob_topics show_counts="yes" sort_column="tt.count" sort_order="DESC"]
Output: