Tag Groups Menu – Shortcode Parameters

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


Shortcode #

[tag_groups_menu]

Example #

[tag_groups_menu taxonomy=product_tag include=1,3,4 type=autoselect]

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 #

Tags or Terms #

include #

Determines which groups to include.

accepted valuesdefaultexample shortcode
comma-separated list of group IDsempty (all enabled)include=1,5

taxonomy #

Determines the post page where the posts will be filtered. Available are only taxonomies that have been activated in the Settings.

accepted valuesdefaultexample shortcode
one taxonomy namepost_tagtaxonomy=product_tag

Menu #

type #

The type of menu.

  • “select”: Drop-down menu with a submit button. The posts will only be displayed when the user clicks on the button.
  • “autoselect”: Drop-down menu without a button. The posts will be displayed as soon as the user selects an option.
accepted valuesdefaultexample shortcode
stringselecttype=select

  #

Target Page #

custom_url #

Optional custom URL where you want to display the posts.

accepted valuesdefaultexample shortcode
stringnonecustom_url='https://www.example.com/posts/'

shop #

If you supply this parameter, then the search will happen on the default product page. This page is determined according to the e-commerce plugin. Currently there is only “wc”, which stands for “WooCommerce”.

accepted valuesdefaultexample shortcode
stringemptyshop=wc

Labels and Messages #

submit_label #

Text on the submit button, if you use one.

accepted valuesdefaultexample shortcode
string“search”submit_label="submit"

not_assigned_name #

Label of the button for the “not assigned” group.

accepted valuesdefaultexample shortcode
string“not assigned”not_assigned_name="all the rest"

Advanced Styling #

You can set here IDs and classes to be referred to in CSS. You need some knowledge of CSS to use these options.

div_id #

Define an ID for the enclosing <div>.

Avoid words that are used by WordPress such as “content” or “main”. Each ID must be unique for the entire page.

accepted valuesdefaultexample shortcode
stringempty (random value)div_id=“sidebar_01”

div_class #

Define a class for the enclosing <div>.

accepted valuesdefaultexample shortcode
stringnonediv_class=“make-it-dark”