This post explains how to add tags to your USP Form.
Add Global/Default Tags
To set the default tags that are displayed whenever you add the Tags field via shortcode,
Step 1: Visit plugin General settings > Tag Settings > “Post Tags”
Step 2: Select any tags that should be displayed by default in any form (applies when displaying tags as dropdown or checkboxes) (click the toggle link to view tag list)
After saving your changes, any selected tags will be displayed in any USP Form that includes the
[usp_tags] shortcode. The default tags can be overridden as follows.
Add Tags to Individual Forms
To override the default tags on a per-form basis:
Step 1: Add the
include attribute to the tags shortcode, like so:
Any tags specified via
include will be displayed, along with any that are specified globally. Note that you can use
include="all" to display all non-empty tags, or
include="all_include_empty" to display all tags, even if empty.
Exclude Tags on Individual Forms
To exclude any tags from displaying:
Step 1: Add the
exclude attribute to the tags shortcode, like so:
Check out the Shortcode documentation for details.
Allow Users to Add New Tags
You also can enable users to specify their own tags.
Assign Specific Tags to All Forms
Another way of adding tags is to automatically assign tags via hidden field. There are two ways of doing this:
Globally — to set required tags that will be assigned to all USP Forms:
Step 1: Visit USP Pro General Settings > Tag Settings, and enable the setting, “Hide Tags Field”.
With this setting enabled, the tags field that is displayed via the tags shortcode
[usp_tags] will be hidden. This enables you to configure the field using attributes like
exclude to fine-tune which tags are included automatically.
Locally — to set required tags locally (on a per-form basis), add the
tags attribute to the tags shortcode, for example:
This shortcode will display the tags field along with a hidden field that auto-assigns the tags
2 to any posts submitted via the form. Note that we’re using tag IDs for all shortcode attributes.
Where do I find my tag IDs? There are a couple of ways. First you can visit Posts > Tags, and then long-hover your cursor over any tag link. In most browsers, doing this will reveal the full URL at the bottom of the browser window (or somewhere). In the URL, you will see an
ID with a number — that is the tag ID. Alternately, you can get tag IDs directly in the USP Pro General settings. Visit the Tag Settings, toggle open the “Post Tags” list, and hover your cursor over any tag link. The associated tag ID will be displayed in the resulting tooltip info.