S A A S L A N D

Loading

[terms] Shortcode

Estimated reading: 2 minutes 53 views

The [[terms]] shortcode within the Jobi theme is a versatile and invaluable tool for showcasing taxonomy lists associated with various post types in WordPress. While its default setting reveals the category list of a post, its true strength lies in the ability to exhibit any taxonomy list through the integration of the tax attribute.

Shortcode-Rendered Output:
View the rendered output of the [[terms]] shortcode here.

Usage

Default Behavior

  • Basic Structure: The fundamental [[terms]] shortcode without attributes displays the category list of the current post.
  • Example: In a post, utilizing [[terms]] automatically retrieves and showcases the list of categories to which the post belongs.

Custom Taxonomy Display

  • Using tax Attribute: To feature a different taxonomy, employ the tax attribute within the shortcode.
  • Syntax: [[terms tax=”taxonomy_name”]]
  • Example: To display tags instead of categories, use [[terms tax=”post_tag”]].

Attributes

  • tax: Specifies the taxonomy type to display, which can be categories, tags, or any custom taxonomy registered in WordPress.

Examples

Displaying Tags:

[[terms tax="post_tag"]]

This will present a list of tags associated with the post.

Custom Taxonomy

[[terms tax="custom_taxonomy"]]

Replace “custom_taxonomy” with the name of your custom taxonomy to showcase its terms.

Best Practices

  • Check Taxonomy Registration: Ensure the intended taxonomy is properly registered in WordPress.
  • Styling and Appearance: The appearance of the taxonomy list depends on the theme’s CSS; customize styles as needed to align with your site’s design.
  • Use in Relevant Contexts: Employ this shortcode where taxonomy information adds value, such as in blog posts or custom post types.

Conclusion

The [[terms]] shortcode in the Jobi theme is a powerful and dynamic tool for presenting taxonomy lists in WordPress. Its simplicity and flexibility render it suitable for a wide array of applications, elevating the presentation of taxonomies on your website.

Leave a Comment

Share this Doc

[terms] Shortcode

Or copy link

CONTENTS