Search
  • Sotware by
  • Christoph Amthor
Search Menu

Tag Groups Premium – Documentation

Return to the plugin main page.

[toc]

Note: In the following documentation the word “tag” stands for any kind of WordPress term, including custom taxonomies such as WooCommerce Product Tags.

Some of the described functionalities are part of the free Tag Groups plugin. You can see the difference between the free and the premium version in this table and find the documentation here.

The How-To Videos for a First Overview

 

Dependency on the Free Tag Groups Plugin

The Tag Groups Premium plugin requires the free Tag Groups plugin to be installed and activated. Should the free plugin not be installed, then you will see a message that guides you to the installation. You will also see a notification if a later version of the free plugin is required.

Installation and Updating

Since the Tag Groups Premium plugin is not hosted in the WordPress repository, it needs to be installed manually. For the following steps you need to be logged in as administrator (or network administrator). It is recommended to make a database update before updating.

Installation Procedure

  1. Go to the menu Plugins → Add New.
  2. Click on the button “Upload Plugin”.
  3. Click “Browse” and select the file tag-groups-premium.zip. Make sure that you upload the right file – it might be inside another ZIP file that you received.
  4. Click “Install Now”.
  5. Activate the plugin directly there or, on a network installation, on the site where you want to use it.

Updating Procedure

Since version 1.6.0, you can update Tag Groups Premium just the same way as you would update a plugin from WordPress.org.

The tag groups data and the settings are saved with the free Tag Groups plugin, which you simply keep activated while you update the Tag Groups Premium plugin.

If the update should fell on multisite installations, you will need to deactivate and remove Tag Groups Premium. Then you install the new version as zip file, that you have downloaded from the marketplace.

Network Installation

The plugin works well on sites with a “multisite installation”.

Getting Started

If you previously had installed the free Tag Groups plugin, all settings and groups will be carried over to the premium plugin. If you start with a fresh installation of Tag Groups, it is recommended to follow these steps:

  1. Go to the “Basics” tab in the “Tag Groups Premium settings”. There you select the taxonomy (that is the tag type) that you want to organize under groups. In most cases you keep “post_tag”, but in some cases it might be “product_tag” or others.
  2. Depending on the chosen taxonomy, a new submenu and page appears next to submenu of the corresponding tags, called “Tag Groups”. By default it is located under “Posts”, in the case of “product_tag” it is located under “Products”.
  3. On the “Tag Groups” page you create the groups you need. You can return any time later to make changes.
  4. Then go to the tags (or product tags, or others) and assign them to these groups as needed.
  5. That’s all to get started. You can now display the tags in tag clouds or you enable the meta box in the settings so that you can work with the tags on the post edit screen.

You find more details for each step below.

Settings

The settings reside under the Settings menu.

Taxonomy

Taxonomies are types of tags. The default WordPress post uses post_tag (that are the standard tags) and category but other plugins can add their own taxonomies.

Before working with tag groups, you should figure out which taxonomies you want to use. Activated taxonomies will have a “Tag Groups” submenu under the menu where you find their posts.

The list shows also taxonomies that are not visible. Activate only those where you need the group functionality.

It is not recommended to activate more than one taxonomy per post type, and some features won’t work with hierarchical taxonomies, such as categories. You can see the post type by hovering the mouse over a taxonomy.

Theme

Here you can choose between three standard themes or set your own theme, that you created with the jQuery UI ThemeRoller. You find step-by-step instructions on this settings page.

Export/Import

If you want to move the settings to another website or just back them up separately, you can use this tool. All information is part of the standard WordPress database and can be backed up also with the usual backup plugins.

The exported file does not contain any tags. If you import the settings from another website or after having edited the tags, their assignment to the imported tag groups might not match anymore.

Reset

Here you have the option to delete all groups and reset your tags to “not assigned”. You can also set what happens if you delete the free Tag Groups plugin: keep the settings or wipe them. This does not regard the Tag Groups Premium plugin, and just inactivating the plugin won’t delete anything.

Meta Box

The functionality of the Meta Box is described below.

In the settings you can choose for which of your active Taxonomies the Meta Box will appear. The Meta Box works only for one taxonomy per post type and only for non-hierarchical taxonomies, such as post_tag or product_tag.

You also have four options regarding the way how tags can be entered:

  • You can automatically open all groups that contain tags of the post that you start editing.
  • You can hide the default tag box so that you will work only with tags that are assigned to groups.
  • You can restrict the tags entered in the Meta Box to existing tags. That option might be useful if you want to set up a pool of allowed tags and your post authors should not be able to add new tags.
  • You can prevent tags from being moved to a new group. Otherwise authors would be able to enter a tag that already exists in another group, that way moving it to a new group.

Permissions

On the Permissions screen, you can determine who is allowed to edit tag groups. That way you can prevent that authors make changes to the groups, while they are still allowed to use them. Here you can also allow exceptions to the rule that prevents the creation of new tags, or moving tags to another group in the meta box

Post Tags

Tag Groups

Filter tag_groups_post_terms

Object Cache

Caching helps your server speed up the generation of tag clouds by saving the finished output and reusing it for some time, instead of recalculating everything again. In the settings you can turn it off or choose the location where the output will be saved (database or file system).

It is recommended to try first “database”. The “filesystem” works only if your server allows to save files. The option “other” tries to make use of other plugins that provide an object cache.

Writing and Editing Your Content

Creating and Editing Groups

After you have chosen the right taxonomies in the Tag Groups settings, you can start creating tag groups. You find the “Tag Groups” submenu at the place that corresponds to the chosen taxonomy. Administrators can always access it, for other users you might have to adjust the “permissions” in the Tag Group settings.

WordPress Tag Groups - group administration

Click on the plus sign to insert a new group and on the trash bin to remove it. You change the name by clicking into the name. The order can be changed by drag-and-drop, or with the arrows on the right.

When you delete a group, the assigned tags won’t be deleted but only unassigned.

Working with Tags

Each tag can be assigned to one or more1 tag groups, or it can remain unassigned. Tags that were created in the default tag box on the post edit screen or on the list of posts (via Quick Edit) are unassigned. If you create or edit a tag through the Tags page (in the Posts menu), you find there a pull-down menu with your tag groups.

Multiple Groups

Wordpress - Edit Tags - multiple groupsEach tag can be assigned to one or more groups. These groups are then available for that tag when you edit a post. In each post you can still decide for which of these groups – one or more – you want to use that tag.

Bulk Editing

It is also possible to select multiple tags with the check boxes, select a tag group from the menu above and then click on “Apply”, in order to assign or unassign all selected tags together.

If you bulk-assign to a group, this group will be added to previously assigned groups. If you select “not assigned” for the bulk action, all groups will be removed from the selected tags.

Tag Filter

On that “Tags” page you find a menu above the list that – once applied – shows only tags of a particular group, or only unassigned tags. If you don’t see that menu, you might have to enable it in the settings.

Tags edit page

Example of a “Tags” page where you can add and edit tags.

Working with Posts

Post Filter

If the post filter is enabled in the settings, you find it above the list of posts (or pages, products, … – depending on your chosen taxonomy). The activated filter shows only those posts that contain tags, which are assigned to a particular group.

Let’s say you have a tag group called “Countries” with tags “Poland”, “Senegal”, “Vietnam” and “Japan”. If you now filter by the group “Countries”, you will only see posts that contain at least one of the mentioned country tags.

Using the Meta Box on the Post Edit Screen

The default box where you add tags naturally does not use tag groups. Therefore, the plugin offers a “Meta Box” that helps you edit post tags separated by groups. The meta box can be adjusted like the other boxes on the post edit screen: You can move it around (below the text box and into the sidebar), fold it and hide it by deselecting it in the “Screen Options” on the very top. If you use the plugin’s meta box, it makes sense to disable the default tag box in the settings.

The Meta Box handles only tags that are assigned to one of the groups.

Tag Groups Premium - Meta Box - colored tagsIn the Meta Box you can open only particular tag groups, or open all by clicking on the arrow-down icon on the right side of the box. The arrow-up icon closes all groups again. Once a group is open, the tag input field is already populated with tags that belong to that group. Click into the field and click on one of the tags that appear in the menu, or start typing to see all tags of this group that match the characters.

On the right of the tag group name you find two buttons: The left one adds all tags of this group, the right one closes this group in the editor.

Depending on the settings, you may also add new tags or add a tag that is currently in another group, in order to move it to this group. Added and moved tags will be marked green and yellow. If the settings allow you to move tags, you can also move them by drag and drop.2

Nothing is final until you save that post. Until then, no new tags will be created, no tags moved to other groups and no post tags changed.

Only when you save the post, it will receive the new tags and keep the old tags that it had before and that were hidden in groups that you kept close.

Please note that other plugins and usual templates usually don’t use tag groups. For them, all tags form just one unsorted group. If you want to display them in groups to your visitors, you need to use the shortcodes of this plugin or modify your theme.

Shortcodes

Shortcodes are something like placeholders. You add them into the text of a post or page and they will be replaced in the output with something different, depending on the code you use. Shortcodes are enclosed by square bracket and they start with a shortcode’s specific name, followed by optional parameters. Parameters can be numbers or words, and they look like size=12, button=large or title=”Hello there!” (Enclosed in single or double quotes because otherwise the space and everything following would not be included.).

When you copy shortcodes from this site, please make sure you don’t copy over any formatting (e.g. bold). It is also recommended to re-type all (double) quotes since curly/tilted quotes are not recognized by WordPress.

Tag Clouds

The premium plugin offers three shortcodes that display your tags segmented by groups. The shortcodes [tag_groups_cloud] and [tag_groups_accordion] come already with the free Tag Groups plugin, and the premium plugin adds [tag_groups_table] and [tag_groups_combined_cloud]. All of them can be customized with a big variety of parameters, which are explained here. You can see examples of these shortcodes in action on the demo pages.

Tag clouds that are created by Tag Groups (Premium) automatically receive parameters into their links that filter the resulting list of posts additionally by tag group. If the resulting list is unexpectedly empty or misses posts, please see the troubleshooting advice below.

It is recommended to switch your editor first from “Visual” to “Text” mode before pasting a shortcode or parameters so that you don’t accidentally paste any formatting that would break the code.

The Dynamic Post Filter

The Dynamic Post Filter can be inserted into a page with the shortcode [tag_groups_dpf]. You can use it only once on each page.

Displaying Posts Filtered by Groups and Tags

Imagine you write posts about your travels and you tag these posts with the names of the countries. Now, you may want to assemble all those country tags under a tag group called “Countries”. Using the Dynamic Group Filter, your visitors can now open the group “Countries” and then select tags of your countries. The list of posts refreshes automatically and displays all posts that match one of the selected country tags. You can also configure the filter to show all posts that match all tags.

Dynamic post filter with tags, WordPress

Example of the 2-layered Dynamic Post Filter: First select the group, then the tags.

If you don’t need the interactivity of the Dynamic Post Filter, or if you want to display all tags as clickable links, you can as well use one of the tag clouds. They are highly customizable so that you can, for example, display all tags in the same size or prepend to each the same character. Using the tag clouds, however, visitors don’t see immediately the list of matching posts. Instead, a click on the tag takes them to a “tag page”, where all posts are listed that have this tag.

Displaying Posts Filtered by Groups Only

The parameter “groups_only” reduces the filtering process to one step. After selecting one or more tag groups, the list shows posts that have at least one tag from at least one of these groups.

Please note that the option “groups_only” will lead to slow performance with more than 3 or 4 groups selected.3

Wordpress dynamic post filter by groups

Filtering only by groups

You can customize the Meta Box shortcode with several parameters, such as post template, the number of posts, and more. Find the parameters and descriptions here.

 

Using the Post Filter on the Front End

On default WordPress pages that show lists of posts you can filter that list by tag (term) group.4 Simply append the query parameter “term_group” with the group’s ID to the URL of that page. Example:

https://www.example.com/?term_group=3

You can also filter by a term and show only posts that use this term in a particular group. In that case use “term_group” and “term_id”. Example:

https://www.example.com/?term_id=195&term_group=3

If you want to filter by tag and group, you alway have to use both “term_group” and “term_id”. It is not sufficient to use only “term_group” on a tag archive page (…/tag/my-tag/?term_group=3 won’t work).

Please note that the first parameter is always appended with a “?”, while all following parameters use a “&”.

If you need to filter just by a term (tag), you simply use the standard Tag page that is part of every theme.

If the filtered list of posts is empty, you can try the troubleshooting advice below.

 

Troubleshooting

Since version 1.8, there is a new “Migrate” button in the Settings under the “Support” tab. This function updates terms and posts so that they can be used in filtering. If you imported posts or tags or created some while this plugin was deactivated, you should use this button to bring the system up to date.

If you have any difficulty or question, please search in the knowledge base or contact me. In case you want to contact me about an issue, I recommend you first read this article so that you have all required background information ready.

Installation fails with an error message

Please make sure you uploaded the right ZIP file. See here for more information.

Clicking on a tag in a tag cloud leads to an empty list (nothing found)

  1. Try the “Migrate” button under the “Troubleshooting” tab in the settings.
  2. Purge any cache if you use a plugin or service for caching.
  3. In some cases another plugin or theme might interfere. You can then turn off the filtering by group in the tag clouds of this plugin by adding to your shortcode the parameter: add_premium_filter=0

Pages with tag group shortcodes are slow

Please make sure that caching is enabled in the Tag Groups Premium settings. Try first “filesystem”. If you don’t see any improvement, try “database”. The speed improvement should be noticeable starting from the second time you load the page after saving the settings.

Show 4 footnotes

  1. since version 1.8
  2. Only with a mouse, currently not possible on touch screens.
  3. That is caused by the way WordPress configures the Post Meta table in the database.
  4. That filter won’t be effective on custom lists created by other themes or plugins or when they modify the database query.
Share