View Categories

Tag List – Shortcode Parameters

This guide shows you how to use and customize the shortcode for the Tag List feature in the Tag Groups plugin.


Shortcode #

[tag_groups_tag_list]

Example #

[tag_groups_tag_list append="{count}"]

Data Types #

  • string: A text. For identifiers that won’t be visible to visitors you often have to replace spaces with _ or -. If the string contains spaces, you need to wrap it in quotes.
  • integer: A number without decimal places.
  • 0 or 1: 0 turns the feature off and 1 on.

Parameters #

This overview assumes that you know how to use shortcodes. Shortcodes are the traditional WordPress way how to add features into posts, pages and widgets.

add_premium_filter #

Modifies the URL – for the case that you use the same tag in various groups.

DefaultPossible ValuesExample
0 (false)0 or 1add_premium_filter=1

amount #

the maximum number of tags per group to display

DefaultPossible ValuesExample
0 (no limit)integeramount=10

append #

adds something behind the tag name; placeholder: {count} for post count

DefaultPossible ValuesExample
emptystringappend=” ({count})”

assigned_class #

adds class name to tags that shows whether the tag is assigned or not; assigned tags have “_1” appended, unassigned “_0” to the class name

DefaultPossible ValuesExample
emptystringassigned_class="colored-tags"

column_count #

number of columns

DefaultPossible ValuesExample
2integercolumn_count=3

column_gap #

width of the gap between columns

DefaultPossible ValuesExample
10pxstringcolumn_gap=20px

custom_title #

tooltip when hovering the mouse over a tag; placeholders: {count} for post count, {description} for tag description, {name} for tag name

If you also use custom_title_plural then the text of custom_title will be used for a post count of 1 and you can use here the singular form

DefaultPossible ValuesExample
depends on show_tag_countstringcustom_title="One post uses {name}"

custom_title_zero #

tooltip when hovering the mouse over a tag; placeholders: {count} for post count, {description} for tag description, {name} for tag name

This text will be used for tags that have a post count of 0 (i.e. they are not used with any published post).

DefaultPossible ValuesExample
not usedstringcustom_title_zero="No post uses {name}"

custom_title_plural #

tooltip when hovering the mouse over a tag; placeholders: {count} for post count, {description} for tag description, {name} for tag name

This text will be used for tags that have a post count of >1. You can use here plural forms.

DefaultPossible ValuesExample
not usedstringcustom_title_plural="{count} posts use {name}"

div_class #

class of the enclosing div for own styling

DefaultPossible ValuesExample
tag-groups-tag-liststringdiv_class="my-class"

div_id #

ID of the enclosing div

DefaultPossible ValuesExample
randomstring (must be unique on the page)div_id="my-id"

exclude_terms #

a list of tags that should not appear

DefaultPossible ValuesExample
emptycomma-separated list of tag IDsexclude_terms=

group_in_class #

whether to add information about the groups into the class attribute; tg_tag_group_id_ + ID and tg_tag_group_label_ + tag name (spaces replaced with dashes)

DefaultPossible ValuesExample
0 (off)0 or 1group_in_class=1

groups_post_id #

ID of a post that the tags should be take from. 0 tries to get current post.

DefaultPossible ValuesExample
-1 (off)integergroups_post_id=5634

h_level #

<h3>/h3>, <h4></h4>, … of the headings with the group names

DefaultPossible ValuesExample
3integerh_level=2

header_class #

class for the headers

DefaultPossible ValuesExample
emptystringheader_class="my-class"

hide_empty_content #

hide empty groups

DefaultPossible ValuesExample
0 (off)0 or 1hide_empty_content=1

hide_empty #

hide tags with post count zero

DefaultPossible ValuesExample
10 or 1hide_empty=0

threshold #

Set a minimum count of published posts that use a tag for this tag to appear. Posts are counted across all groups. Please also pay attention to the value of hide_empty.

DefaultPossible ValuesExample
0integerhide_empty=0

include #

groups to include

DefaultPossible ValuesExample
allcomma-separated list of group IDsinclude=2,3,5

exclude #

groups to exclude

DefaultPossible ValuesExample
nonecomma-separated list of group IDsexclude=2,3,5

include_terms #

tags to include (see also “hide_empty”)

DefaultPossible ValuesExample
allcomma-separated list of tag IDsinclude_terms=12,34,255

keep_together #

whether to keep headings and tag block together; otherwise tags lists may continue in a new column

DefaultPossible ValuesExample
1 (on)0 or 1keep_together=1

largest #

max. font size in pt

DefaultPossible ValuesExample
12integerlargest=32

link_target #

target attribute of the tag link (_blank, _top, _self, …)

DefaultPossible ValuesExample
emptystringlink_target="_top"

link_append #

append query to the link

DefaultPossible ValuesExample
emptystringlink_append=“source=cloud”

not_assigned_name #

lets you choose a custom group name for not-assigned tags

DefaultPossible ValuesExample
not assignedstringnot_assigned_name="unsorted tags"

order #

ascending or descending order; use with orderby

DefaultPossible ValuesExample
ascstring (asc or desc)order=desc

orderby #

by what to order the tags

use together with order

DefaultPossible ValuesExample
namestringorderby=natural

prepend #

prepend to the tag; placeholder: {count} for post count

DefaultPossible ValuesExample
emptystringprepend="#"

show_not_assigned #

whether to show tags that are not assigned to any group

DefaultPossible ValuesExample
00 or 1show_not_assigned=1

show_all_groups #

whether to show also empty groups

DefaultPossible ValuesExample
0 (off)0 or 1show_all_groups=1

show_tag_count #

show the post count in the title (deprecated option, better use custom_title

DefaultPossible ValuesExample
1 (on)0 or 1show_tag_count=0

smallest #

min. font size in pt

DefaultPossible ValuesExample
12integersmallest=14

tags_div_class #

class name for the divs around tags

DefaultPossible ValuesExample
emptystringtags_div_class="my-class"

tags_post_id #

Use post ID or zero for current post.

DefaultPossible ValuesExample
-1 (not used)integertags_post_id=0

taxonomy #

taxonomies (tag types) to use

DefaultPossible ValuesExample
all selected in the settingscomma-separated list of taxonomy names/slugstaxonomy=product_tag