User Tags Setup

Overview

User Tags allow users to associate tags with their profile and allows users to see all users with a specific tag e.g all users who have the skill "HTML". This document explains how to use setup user tags.

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

[Ultimate Member > Settings > Extensions > User Tags]

User Role settings #

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

Note: 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.

[Ultimate Member > User Roles > Edit Role]

User tags #

When activated the plugin will add a 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.

Creating a parent tag

All tags that an end user can select must be grouped together under a parent tag (users can not select the 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 user selectable tag

All tags that an end user can select must be grouped together under a parent tag e.g "Skills". To create a user 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 is 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 user to select it is time to add the tags to the front-end of your website.

Allowing users to select tags

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 Ultimate Member > Forms and edit the profile form.
  2. Click the + icon in the form builder to open up the field selector modal.
  3. Click the user tag field type from modal
  4. Fill in the details for the field e.g Title, Label, Meta Key etc
  5. Enter a number in the "Maximum number of selections" field if you want to limit the number of tags a user can select from the tag group.
  6. Select the parent tag from the "Select a user tags source" (this is the parent tag)
  7. Add this field to profile form and update profile form.

What the end-user sees

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 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 User Roles page and edit the user role e.g Member
  2. Scroll down until you find the "User Tags" section
  3. Enable option "Show user tags in profile head?"
  4. Update the user 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.

Once you have done this, the tags for that tag group will show in 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 [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".

Clicking on a tag

When a user clicks on a user tag, they will be redirected to the default member directory of the directory page where it will show all users who have selected that tag. The tag will show above the profile cards. 

The URL for the directory when a tag has been clicked looks like this (using our skills example):

https://www.domain.com/members/user-tag/html/?tag_field=skills

If you want to create a custom URL link to a specific tag in the directory the URL should be (add your field meta key and replace tag slug with the actual slugs):

{members-page-url}/ {user-tag-slug}/{term-slug}/?tag_field={user-tag-field-key},

where:

  • {members-page-url} is the URL of the page selected by the "Base member directory" option;
  • {user-tag-slug} is the value of the "User tag slug" option;
  • {term-slug} is the slug of the term - user tag (selectable) you search for;
  • {user-tag-field-key} is the meta key of the field you search for.

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 Members 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.

[Pages > Edit]

The shortcode's attributes:

  • term_id (integer) - the ID of the term - user tag (parent) you search for;
  • user_field (string) - the meta key of the field you search for;
  • number (integer) - maximum number of terms to return;
  • 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 widget "Ultimate Member - User Tags". 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].

[Appearance > Widgets]

[Home Page]