User Tags Setup

Overview

This document explains how to configure and use the extension User Tags. This extension allows users to associate tags with their profile and shows all users with a specific tag.

Contents

Settings #

Extension's settings #

  • User tag slug - Determines the rewrite rule* for the Member Directory page if it shows members filtered by user tag;
  • Maximum number of tags to display in user profile - Limits the number of tags that are shown initially in the profile header;
  • Base member directory - Select the base member directory to use its settings for displaying users with this tag.

Note: Once the "User tag slug" option is changed you should update WordPress rewrite rules. Go to the page [Settings > Permalinks] and click the "Save Changes" button. You shouldn't change anything on the page [Settings > Permalinks], just click a button. WordPress will update rewrite rules and a rule from the option "User tag slug" will be implemented.

Image - Settings on wp-admin > Ultimate Member > Settings > Extensions > User Tags.

User Role settings #

  • Show user tags in profile head? - Enable/disable displaying user tags in profile header*;
  • Choose the user tags source to show in profile header - Add user tags to the profile header.
  • Can add tags? - Allow this role to add custom user tags while editing the profile.

There is an alternative way to add user tags to the profile header. You may use the panel "User Meta" in the profile form settings page.

Image - Settings on wp-admin > Ultimate Member > User Roles > Edit Role.

Create User Tags #

When activated the plugin adds the User Tags link to the Ultimate Member submenu. Clicking this link will take you to the user tags page which is where you can create user tags.

All tags that a member can select in profile must be grouped together under a parent tag. Members can not select the parent tag in their, this tag in used for grouping.

Image - Settings on wp-admin > Ultimate Member > User Tags.

Creating a parent tag #

Before you can start creating user tags you need to create a parent tag. To create a parent tag e.g "Skills" do the following:

  1. Enter Name e.g "Skills"
  2. Enter Slug e.g "skills"
  3. Parent - leave as "None"
  4. Description - Leave blank
  5. Click the "Add new user tag" button

Creating a selectable tag #

To create a selectable tag do the following:

  1. Enter Name e.g "CSS"
  2. Enter Slug e.g "css"
  3. Parent - Select the parent tag you want the user-selectable tag to belong to e.g "Skills"
  4. Description - This is an optional field and if a description has been added this description will show on the front-end of your site e.g "A cascading style sheet (CSS) is a Web page derived from multiple sources with a defined order of precedence where the definitions of any style element conflict."
  5. Click the "Add new user tag" button.

Once you have created all the tags you want the user to select, it is time to add the tags to the front-end of your website.

Allow users to select tags in profile #

To allow users to associate tags with their account you need to add a user tag field to either the registration form or the profile form. In this example we will add a user tag field to the user profile form:

  1. Go to wp-admin > Ultimate Member > Forms and edit the profile form.
  2. Click the + icon in the Form Builder to open up the Fields Manager modal.
  3. Click the User Tags field type in the Fields Manager modal.
  4. Fill in the field details: Title, Label, Meta Key, etc.
  5. Enter a number in the "Maximum number of selections" if you want to limit the number of tags a user can select. 0 - unlimited.
  6. Select the parent tag from the "Select a user tags source" dropdown (this is the parent tag).
  7. Add this field to the profile form and update the profile form.

Image - User Tags field settings.

User Tags in the profile #

Profile form fields #

When the user enters the edit mode of their profile, the user tag field will look like this:

To select a tag, the user can click into the field which will bring up a list of the tags:

The user can also start typing characters to search for a specific tag:

Once a user has found a tag they want to add to their profile, they can click on the tag and they will show on the field (in edit-mode) as follows:

Once a user saves/updates their profile, the tags will appear on the front-end of the site:

Displaying user tags in the profile header #

The extension allows you to display one group of tags (one parent tag group) in the profile header area. To show user tags in the profile header you need to turn this option on by editing the user role as this option is on a per-user role basis.

  1. Go to the User Roles page and edit the user role e.g Admin
  2. Scroll down until you find the "User Tags" section
  3. Enable the option "Show user tags in profile head?"
  4. Update the user role.

Image - The User Tags settings box on wp-admin > Ultimate Member > User Roles > Edit Role.

There is an alternative way to add user tags to the profile header. You may use the panel "User Meta" in the profile form settings page.

Image - The User Meta settings box on wp-admin > Ultimate Member > Forms > Edit Form > User Meta.

Once you have done this, the tags for that tag group will show in the profile header:

Limiting user tags in the profile header #

There is the option "Maximum number of tags to display in user profile" on the page wp-admin > Ultimate Member > Settings > Extensions > User Tags. This option limits the number of tags that are shown initially in the profile header, with the remaining tags only shown when "show more link" is clicked. The default number for this option is "5".

User Tags in the member directory #

When users click on a user tag link, they will be redirected to the default member directory page where it will show all users who have selected that tag.

See the article User Tags + Member Directories 2.1.0+ for details.

Shortcode #

The extension adds the shortcode [ultimatemember_tags]. This shortcode displays a list of the User Tags, where each item is a link to the default member directory page with predefined filtering by chosen user tag. You may use this shortcode as any usual WordPress shortcode - just put it into the page as the shortcode block.

Image - The [ultimatemember_tags] shortcode example.

Example:

[ultimatemember_tags term_id="4" user_field="test_user_tags" number="10" orderby="count" order="desc" ]

The shortcode attributes:

  • term_id (integer) - the ID of the term - user tag (parent) you search for. Required.
    Go to wp-admin > Ultimate Member > User Tags, hover your mouse on the user tag name and check the browser's status bar to find the tag_ID.

  • user_field (string) - the meta key of the field you search for. Required.
    To find the field meta key go to wp-admin > Ultimate Member > Forms > Edit Form and edit the User Tags field.

  • number (integer) - maximum number of terms to return. Required.
  • orderby (string) - order terms by: id, name, count, slug, description. Default 'count'.
  • order (string) - whether to order terms in ascending or descending order. Accepts 'asc' (ascending) or 'desc' (descending). Default 'desc'.

Widget #

The extension adds the Ultimate Member - User Tags widget. This widget displays a list of the User Tags, where each item is a link to the Members page with predefined filtering by chosen user tag. You may use this widget as any usual WordPress widget - just put it into the sidebar on the page Appearance > Widgets.

Image - The Ultimate Member - User Tags widget example on wp-admin > Appearance > Widgets.

Image - The Ultimate Member - User Tags widget view example on the front end.