View Categories

Alphabetical Tag Index – Shortcode Parameters

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


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

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_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
0integerthreshold=2

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_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

by what to order the tags

optiondescription
namedisplay name of the tag
naturalnatural sort order
countpost count
slugtag slug
term_idID of the tag
descriptiontag description
randomrandom order that changes when all object + page caches refresh
term_orderA custom sort 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