🧩 Plugin: Custom Taxonomy Shortcode
Displays terms from any taxonomy (Tags, Categories, or custom) via shortcode.
🔧 Shortcode
[taxonomy_terms taxonomy="taxonomy_name"]
✅ Supported Attributes
| Attribute | Description |
|---|---|
| taxonomy | (Required) Taxonomy slug (e.g. post_tag, category, collaborators). |
| post_id | (Optional) Post ID. Defaults to the current post. |
| default | Fallback if no terms exist. |
| before / after | HTML/text to wrap the output. |
| esc | html (default), attr, or raw. |
| nl2br | Convert newlines to <br>. Defaults to true. |
| separator | String to join items. Default is <br>. |
| link | true makes each term a hyperlink to its archive. |
🧪 Examples
Tags (built-in):
[taxonomy_terms taxonomy="post_tag" separator=", " link="true"]
Categories (built-in):
[taxonomy_terms taxonomy="category" separator=" / "]
Custom taxonomy (e.g. collaborators):
[taxonomy_terms taxonomy="collaborators" separator="<br>"]
🧠 Template Function
echo cts_get( 'collaborators', [
'separator' => ', ',
'link' => 'true',
'default' => 'No collaborators'
]);