Search
  • Sotware by
  • Christoph Amthor
Search Menu

Tag Groups – Shortcodes

Return to the plugin’s main page.

Note: Parameters below are displayed with formatting. When you copy & paste them into your editor, make sure that no formatting is copied over and that double quotes (“) don’t appear formatted (curly or tilted). It is recommended to switch the editor from “Visual” to “Text” before pasting and to re-type all quotes.

Shortcode for Tabs

[tag_groups_cloud]

Parameters

Tags or Terms:

  • smallest=x Font-size in pt of the smallest tags. Default: 12
  • largest=x Font-size in pt of the largest tags. Default: 22
  • taxonomy=”x,y,…” Restrict the tags only to these taxonomies. Default:taxonomies selected in the settings under “Basics”
  • include_terms=”x,y,…” Comma-/Space-separated list of tag/term IDs that alone should be included. Default: empty (= no restriction)
  • exclude_terms=”x,y,…” Comma-/Space-separated list of tag/term IDs that should be excluded. exclude_terms is ignored if you use include_terms. Default: empty (= no restriction)
  • orderby=abc Which field to use for sorting: name, count, slug, term_id, description and others. Use “natural” for natural sort order. Default: name
  • order=ASC or =DESC Whether to sort the tags in ascending or descending order. Default: ASC
  • amount=x Maximum amount of tags in one cloud (per group). Default: 0 (unlimited)
  • hide_empty=1 or =0 Whether to hide or show tags that are not assigned to any post. Default: 1 (hide empty)
  • tags_post_id=x Display only tags that are assigned to the post (or page) with the ID x. If set to 0, it will try to retrieve the current post ID. Default: -1 (all tags displayed)
  • assigned_class=”something” A modification of the tags_post_id parameter: Rather than hiding tags that are not assigned to the post (or page), they can be styled differently. Tags will receive this class name with appended _1 or _0. (If you output the tags as an array, a new element with the key “assigned” will be true or false.)
  • separator=”•” A separator between the tags. Default: empty
  • separator_size=12 The size of the separator. Default: 12
  • adjust_separator_size=1 or =0 Whether to adjust the separator’s size to the size of the following tag. Default: 0
  • prepend=”#” Prepend to each tag label. Default: empty
  • append=”something” Append to each tag label. Default: empty
  • link_target=”_blank” Set the “target” attribute for the links of the tags. Possible values: _blank, _self, _parent, _top, or the name of a frame. Default: empty (= opens in the same window, same as using _self)
  • show_tag_count=1 or =0 Whether to show the number of posts as tooltip (behind the tag description) when hovering the mouse over the tag. Default: 1 (show)
  • custom_title=”abc” Custom title shown as tooltip. No HTML, but you can use {count} and {description} as placeholders. Default: empty (using the description, see also show_tag_count)
  • add_premium_filter=0 or =1 Optionally disable additional query parameters in the links that are used by the premium plugin to distinguish between the same tag that is used in different groups. Default: 1 (use the filter)

Groups and Tabs:

  • include=”x,y,…” IDs of tag groups (left column in list of groups) that will be considered in the tag cloud. Empty or not used means that all tag groups will be used. Default: empty
  • groups_post_id=x Display only groups of which at least one assigned tag is also assigned to the post (or page) with the ID x. If set to 0, it will try to retrieve the current post ID. Default: -1 (all groups displayed). Matching groups will be added to the list specified by the parameter include.
  • show_tabs=1 or =0 Whether to show the tabs. Default: 1
  • hide_empty_tabs=1 or =0 Whether to hide tabs without tags. Default: 0 (Not implemented for PHP function with second parameter set to ‘true’. Not effective with groups_post_id.)
  • show_all_groups=1 or =0 Whether to force showing all groups. Useful with the parameters tags_post_id and assigned_class. Default: 0
  • show_not_assigned=1 or =0 Whether to show a group with not-assigned tags. Default: 0
  • not_assigned_name=”abc” The name used in the tab of not-assigned tags. Default: “not assigned”
  • collapsible=1 or =0 Whether tabs are collapsible (toggle open/close). Default: general settings in the back end
  • mouseover=1 or =0 Whether tabs can be selected by hovering over with the mouse pointer (without clicking). Default: general settings in the back end
  • active=1 or =0 Whether tabs are initially expanded or collapsed. Useful in connection with the parameter collapsible. Default: 1

Advanced Styling:

  • div_id=abc Define an id for the enclosing <div>. If you display more than one tag cloud on the same page, each shortcode needs a different value. By default, div_id receives a random value so that you can use multiple clouds on the same page.
  • div_class=abc Define a class for the enclosing <div>. Default: tag-groups-cloud-tabs
  • ul_class=abc Define a class for the <ul> that generates the tabs with the group labels. Default: empty

 

Shortcode for an Accordion

[tag_groups_accordion]

Parameters

Tags or Terms:

  • smallest=x Font-size in pt of the smallest tags. Default: 12
  • largest=x Font-size in pt of the largest tags. Default: 22
  • taxonomy=”x,y,…” Restrict the tags only to these taxonomies. Default:taxonomies selected in the settings under “Basics”
  • include_terms=”x,y,…” Comma-/Space-separated list of tag/term IDs that alone should be included. Default: empty (= no restriction)
  • exclude_terms=”x,y,…” Comma-/Space-separated list of tag/term IDs that should be excluded. exclude_terms is ignored if you use include_terms. Default: empty (= no restriction)
  • orderby=abc Which field to use for sorting, e.g. name, count, slug, term_id, description and others. Use “natural” for natural sort order. Default: name
  • order=ASC or =DESC Whether to sort the tags in ascending or descending order. Default: ASC
  • amount=x Maximum amount of tags in one cloud (per group). Default: 0 (unlimited)
  • hide_empty=1 or =0 Whether to hide or show also tags that are not assigned to any post. Default: 1 (hide empty)
  • tags_post_id=x Display only tags that are assigned to the post (or page) with the ID x. If set to 0, it will try to retrieve the current post ID. Default: -1 (all tags displayed)
  • assigned_class=”something” A modification of the tags_post_id parameter: Rather than hiding tags that are not assigned to the post (or page), they can be styled differently. Tags will receive this class name with appended _1 or _0. (If you output the tags as an array, a new element with the key “assigned” will be true or false.)
  • separator=”•” A separator between the tags. Default: empty
  • separator_size=12 The size of the separator. Default: 12
  • adjust_separator_size=1 or =0 Whether to adjust the separator’s size to the size of the following tag. Default: 0
  • prepend=”#” Prepend to each tag label. Default: empty
  • append=”something” Append to each tag label. Default: empty
  • link_target=”_blank” Set the “target” attribute for the links of the tags. Possible values: _blank, _self, _parent, _top, or the name of a frame. Default: empty (= opens in the same window, same as using _self)
  • show_tag_count=1 or =0 Whether to show the number of posts as tooltip (behind the tag description) when hovering the mouse over the tag. Default: 1 (show)
  • custom_title=”abc” Custom title shown as tooltip. No HTML, but you can use {count} and {description} as placeholders. Default: empty (using the description, see also show_tag_count)
  • add_premium_filter=0 or =1 Optionally disable additional query parameters in the links that are used by the premium plugin to distinguish between the same tag that is used in different groups. Default: 1 (use the filter)

Groups and Accordions:

  • include=”x,y,…” IDs of tag groups (left column in list of groups) that will be considered in the tag cloud. Empty or not used means that all tag groups will be used. Default: empty
  • groups_post_id=x Display only groups of which at least one assigned tag is also assigned to the post (or page) with the ID x. If set to 0, it will try to retrieve the current post ID. Default: -1 (all groups displayed). Matching groups will be added to the list specified by the parameter include.
  • show_accordion=1 or =0 Whether to show the accordion. Default: 1
  • hide_empty_content=1 or =0 Whether to hide content without tags. Default: 0 Not effective with groups_post_id.)
  • show_all_groups=1 or =0 Whether to force showing all groups. Useful with the parameters tags_post_id and assigned_class. Default: 0
  • show_not_assigned=1 or =0 Whether to show a group with not-assigned tags. Default: 0
  • not_assigned_name=”abc” The name used in the tab of not-assigned tags. Default: “not assigned”
  • collapsible=1 or =0 Whether accordion content is collapsible (toggle open/close). Default: general settings in the back end
  • mouseover=1 or =0 Whether accordion headers can be selected by hovering over with the mouse pointer (without clicking). Default: general settings in the back end
  • active=1 or =0 Whether the accordion is initially expanded or collapsed. Useful in connection with the parameter collapsible. Default: 1

Advanced Styling:

  • div_id=abc Define an id for the enclosing <div>. You need to define different values if you use more than one accordion on one page. Make sure this id has not yet been used – including the active theme and other plugins. Recommended are non-standard values to avoid collisions of names, replace spaces by underscores or hyphens, or use “camelCase”.By default, div_id receives a random value so that you can use multiple clouds on the same page.
  • div_class=abc Define a class for the enclosing <div>. Default: tag-groups-cloud-accordion
  • header_class=abc Define a class for the <h3> that contains the headers. Default: empty
  • heightstyle=abc The heightstyle parameter determines how the height of the boxes with tags will be determined. Possible values are “auto” (all boxes will be set to the height of the tallest box), “fill” (expand to the available height based on the accordion’s parent height) or “content” (each panel will be as tall as its content). Default: “auto”
  • inner_div_class=abc Define a class for the <div> that contains the tags. Default: empty

 

Hard Coding Into Your Theme (API)

You can use the function tag_groups_cloud with the (almost) same parameters above for the tabbed cloud. The parameters are provided as array. For examples and inspiration, see this page.

Shortcode to Display Information About Tag Groups

[tag_groups_info]

Parameters

  • group_id One group ID, a comma-separated list of IDs or the keyword “all” that determine which groups to display. Default: 0 (not assigned)
  • taxonomy Comma-separated list of taxonomies. Default: taxonomies selected in the settings under “Basics”
  • html_id Value for id in the enclosing table or span. Default: empty
  • html_class Value for class in the enclosing table or span. Default: empty
  • info What kind of information to display. Default: number_of_tags
    • info=number_of_tags Shows the number of assigned tags. For a single tag group, the output is only a number. For multiple tag groups, the output is a table with the group names on the left side.
    • info=label Shows the label (name) of this group. Works only with one value for group_id.

Examples of the Tag Groups Cloud

Please see the Demo Pages.

Need more?

Check out the shortcodes of the premium plugin.

Share