email@tournamatch.com | Visit our Blog!

Player Profile Social Icons

In the version 3.16 update, we introduced the ability to filter social icons in player profiles. Social icons are the linkable icons that appear in the screenshot below:

Steam icon available after snippet.

By default, Tournamatch supports Facebook, Homepage, Twitch, Twitter, and YouTube. These social icon fields appear as configurable options to your users when he or she edits their player profile:

You may modify the social icons available to your users by adding extending Tournamatch with custom code which filters the default list. Filtering this list is easy, and you should read how to extend a plugin in WordPress if you have never done so before.

A social icon in Tournamatch requires three fields: display_name, icon, and input_type. The display_name is the pretty name displayed to the user when editing his or her profile, the icon field is the name of the FontAwesome icon which will be displayed linkable in the public profile, and the input_type is text. You can look up any applicable social media icon on this page under the brand section.

In the screenshot below, the sample code adds the social media icons Instagram and Steam to the default list. Pay special attention to the function array_merge. Using this adds your icons to the list of defaults already given.

Custom Player Profile Social Icons Code
Add a filter for ‘trn_player_social_icon_fields’ to modify the social icons displayed to the user.

Posted

in

,

by

Tags:

Comments

2 responses to “Player Profile Social Icons”

  1. […] Front end screens now use FontAwesome 5. FontAwesome 5 supports thousands more icons than version 4, including countless brand icons. This change should be mostly transparent to your community. The biggest immediate advantage is that site admins now have more branded icons for custom player profile icons. […]

  2. […] be used to add custom team text fields and custom team social icons. These works identical to the custom player fields and social icons, except for teams. You can find out how to add your own from our online […]

Leave a Reply

Your email address will not be published. Required fields are marked *