Alphabetical Tag Index – Shortcode Parameters

This is a feature of the free and the premium plugins. Tag Groups Premium Tag Groups free

Note: This shortcode is also available as Gutenberg block. You can configure the block without using any code or parameters. Read more about the block options.

If you don’t know what is a shortcode and how to use it, you first may want to read this article.

Shortcode

[tag_groups_alphabetical_index]

Example

[tag_groups_alphabetical_index column_count=2]

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.

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})”

column_count

number of columns; for responsive design follow these instructions

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; placeholder: {count} for post count

DefaultPossible ValuesExample
depends on show_tag_countstringcustom_title="We found {count} post(s)"

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_letters

letters/characters that should not appear in the list

DefaultPossible ValuesExample
emptystringexclude_letters=0123456789

exclude_terms

a list of tags that should not appear

DefaultPossible ValuesExample
emptycomma-separated list of tag IDsexclude_terms=

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

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

include_letters

which first letters to use

DefaultPossible ValuesExample
all initials of the displayed tagsstringinclude_letters=abcdz

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”

locale

Customize the locale (language-specific setting) that is used for sorting the first letters (initials). By default we use the language setting of your site. This sort order affects only the order of the first letters, not the tag order (see “orderby” and “order”).

Accepted values depend on which locales PHP can use on your server. They can have formats like “fr”, “fr_FR” or “fr_FR.UTF8”. Please ask your provider if you cannot find it by guessing or googling.

accepted valuesdefaultexample shortcode
stringempty (site locale)locale="fr_FR.UTF8"

ignore_accents

If you turn this on, then accented (or umlaut) letters will be treated like normal letters. For a list of changes see remove_accents.

accepted valuesdefaultexample shortcode
0 or 10ignore_accents=1

order

ascending or descending order; use with orderby

DefaultPossible ValuesExample
ascstring (asc or desc)order=desc

orderby

by what to order the tags:
‘name’, ‘natural’, ‘slug’, ‘term_group’, ‘term_id’, ‘id’, ‘description’, ‘count’;

A custom tag order is available with a 3rd-party plugin.

use together with order

DefaultPossible ValuesExample
namestringorderby=natural

prepend

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

DefaultPossible ValuesExample
emptystringprepend="#"

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

How do you rate this article?