• Sotware by
  • Christoph Amthor
Search Menu

Tag Groups Premium – 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.

Dynamic Post Filter



  • article_class: A class added to the “article” container. Default: ‘tg-post’
  • default_option_label: What the pull-down menu should show when no group is selected. Default: ‘Filter by group’
  • groups_only: If set to 1 (=on), users will only select a group. The second step of selecting tags will be omitted. Default: 0 (off)
  • groups_header: Header above the list of selected groups. Default: ‘Selected groups:’
  • message_only_existing: Error message if user tries to enter a tag that doesn’t exist.
  • message_same_group: Error message if user tries to enter a tag from another group.
  • message_nothing_found: Message to show if no posts were found. Default: ‘Nothing found.’
  • message_load_more: Label of the link to load more posts, if the pager is active. Default: ‘Load more’.
  • message_go_back: Label of the link to go back, if the pager is active. Default: ‘Go back’.
  • operator: How the tags should be logically connected. Possible values are “AND”1, “IN” 2, “IN AND”3, “NOT IN”, “EXISTS” and “NOT EXISTS”. Default: ‘IN’ (= At least one tag matches.). Ineffective if you set “groups_only”.
  • order: “ASC” (ascending: lower to higher, earlier to later, A-Z) or “DESC” (descending). Default: “DESC”
  • orderby: Possible values are: “author”, “title”, “rand” (random)4, “date” and more. Default: “name”
  • pager: 0 (off) or 1 (on).Whether to offer the option to load more. Default: off
  • placeholder: Default message in the tag input field. It disappears as soon as you enter tags. Default: ‘Please enter your tags here.’
  • posts_per_page: Default: 5
  • posts_placeholder: Default: ‘Please select a group.’
  • static_taxonomy: Optionally filter also by an additional taxonomy (for example “category”). Default: none
  • static_terms: A comma-separated list of term IDs, if you use static_taxonomy. Default: none
  • taxonomy: Which taxonomy this filter is for. Default: ‘post_tag’
  • template: HTML code that contains some placeholders. The default template shows every post with a thumbnail – see below. Possible placeholders are: {post_id}, {post_title}, {post_guid} (link to the post, {post_excerpt}5, {post_date}, {post_author}, {image_src} or {image_src|100×100}, {image_alt}, {image_size}. Example: ‘<img src=”{image_src|100×150}” alt=”{image_alt}” {image_size} class=”tg-entry-image” />’. Make sure that single or double quotes appear only once as initial and final delimiters, while the other type of quotes can be used inside the template code.
  • transition: Possible value is ‘fade’. Default: none

The default template is:6

<header class="tg-entry-header">
   <img src="{image_src|100x100}" {image_size} alt="{image_alt}" class="tg-entry-image" />
   <h3 class="tg-entry-title"><a href="{post_guid}" rel="bookmark">{post_title}</a></h3>
   Posted on {post_date} by {post_author}.
<div class="tg-entry-content"><p>{post_excerpt}</p></div>


Examples of the Dynamic Post Filter

Please see the Demo Pages.


Shortcode for Tags (Terms) in Tabs or an Accordion


For a documentation of the parameters, please continue to the documentation of the free base plugin.


Shortcode for Tags (Terms) in a Table



  • smallest=x Font-size in pt of the smallest tags. Default: 12
  • largest=x Font-size in pt of the largest tags. Default: 22
  • 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
  • taxonomy=”x,y,…” Restrict the tags only to these taxonomies. Default: empty (= no restriction)
  • 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)
  • link_append=”abc” Append something to each tag’s link, for example a query. Default: empty.
  • 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)


  • 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.
  • 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”

Advanced Styling:

  • table_class=abc Define a class for the enclosing <table>. Default: empty
  • table_id=abc Define an id for the enclosing <table>. Default: empty
  • td_class=abc Define a class for the body cells (<td>). Default: empty
  • th_class=abc Define a class for the header cells (<th>). Default: empty
  • ul_class=abc Define a class for the tags (<ul>). Default: empty

Multiple Tag Clouds

If you want to use more than one tag cloud, then the div_id parameter needs to be set, starting from the second shortcode, and each values must be different. You can use div_class to have a shared styling for a particular set of tag clouds.

Examples of the Table Tag Cloud

Please see the Demo Pages.


Show 6 footnotes

  1. The displayed posts have all selected tags of all selected groups.
  2. “IN” corresponds to “or” for all groups and tags. The displayed posts have at least one tag among the selected tags of any selected group.
  3. “IN AND” means: “IN” for tags and “AND” for groups. That way you can search for posts that have at least one tag among the tags of the first group, AND at least one among the tags of the second group, and so on for all groups.
  4. For random, the pager will not work properly, since each new page will be randomized again.
  5. User-provided or, if not available, generated.
  6. The text “Posted on %s by %s” can be translated.