{"id":3811,"date":"2021-12-06T19:52:00","date_gmt":"2021-12-06T19:52:00","guid":{"rendered":"https:\/\/helpdesk.spider-themes.net\/docs\/docy-wordpress-theme\/using-shortcodes\/terms\/"},"modified":"2021-12-06T19:52:00","modified_gmt":"2021-12-06T19:52:00","slug":"terms","status":"publish","type":"docs","link":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/docs\/docy-wordpress-theme\/using-shortcodes\/terms\/","title":{"rendered":"[terms] Shortcode"},"content":{"rendered":"\n<p>The <code>[[terms]]<\/code> shortcode in the Docy theme is a versatile and useful tool for displaying taxonomy lists associated with various post types in WordPress. By default, it is configured to show the category list of a post, but its flexibility lies in its ability to showcase any taxonomy list through the use of the <code>tax<\/code> attribute. <\/p>\n\n\n\n<p>See the shortcode-rendered output <a href=\"https:\/\/wordpress-theme.spider-themes.net\/docy\/categories\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/wordpress-theme.spider-themes.net\/docy\/categories\/\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Usage<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Default Behavior<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Basic Structure:<\/strong> The basic shortcode <code>[[terms]]<\/code> without any attributes will display the category list of the current post.<\/li>\n\n\n\n<li><strong>Example:<\/strong> In a post, simply writing <code>[[terms]]<\/code> will automatically pull and display the list of categories that the post belongs to.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Custom Taxonomy Display<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Using <code>tax<\/code> Attribute:<\/strong> To display a different taxonomy, use the <code>tax<\/code> attribute within the shortcode.<\/li>\n\n\n\n<li><strong>Syntax:<\/strong> <code>[[terms tax=\"taxonomy_name\"]]<\/code><\/li>\n\n\n\n<li><strong>Example:<\/strong> If you want to display tags instead of categories, you would write <code>[[terms tax=\"post_tag\"]]<\/code>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Attributes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>tax<\/code><\/strong>: Specifies the taxonomy type to display. This can be categories, tags, or any custom taxonomy registered in WordPress.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Examples<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Displaying Tags:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[[terms tax=\"post_tag\"]]<\/code><\/li>\n\n\n\n<li>This will show a list of tags associated with the post.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Custom Taxonomy:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[[terms tax=\"custom_taxonomy\"]]<\/code><\/li>\n\n\n\n<li>Replace <code>custom_taxonomy<\/code> with the name of your custom taxonomy to display its terms.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Check Taxonomy Registration:<\/strong> Ensure that the taxonomy you want to display is properly registered in WordPress.<\/li>\n\n\n\n<li><strong>Styling and Appearance:<\/strong> The appearance of the taxonomy list will depend on the theme\u2019s CSS. Customize the styles as needed to match your site&#8217;s design.<\/li>\n\n\n\n<li><strong>Use in Relevant Contexts:<\/strong> This shortcode is most effective when used in contexts where the taxonomy information adds value to the content, such as in blog posts or custom post types.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The <code>[[terms]]<\/code> shortcode in the Docy theme is a powerful tool for dynamically displaying taxonomy lists in WordPress. Its simplicity and flexibility make it suitable for a wide range of applications, enhancing the way taxonomies are presented on your website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The [[terms]] shortcode in the Docy theme dynamically displays taxonomy lists in WordPress.<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":86,"menu_order":24,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-3811","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/docs\/3811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/comments?post=3811"}],"version-history":[{"count":0,"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/docs\/3811\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/docs\/86"}],"wp:attachment":[{"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/media?parent=3811"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=3811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}