Team Rosters provides a robust capability to customize the plugin’s displays – roster tables, player galleries, and player profiles. The four ways to customize the plugin are described below. Examples of their use are available on the MSTW Development site. Several video tutorials are available to Gold Support members on this site’s Tutorials page.
- Settings Screen. The customization options are so extensive that the plugin’s Settings screen is organized into four tabs – Data Fields & Columns, Roster Tables, Roster Table Colors, and Player Profiles & Galleries.
- Use Team Colors. One cool new display setting is the “
Use Team Colors
” checkbox on theRoster Table Colors
tab. If a team in Team Rosters is linked to the MSTW Schedules & Scoreboards Team DB, and the team colors are specified there, then when this box is checked, the the the plugin uses the linked team’s colors. Note: Checking this box will override any other settings on the admin Settings screen AND any custom CSS. - Custom Stylesheets (CSS). The default stylesheet,
/css/mstw-tr-styles.css
, provides neutral blue tones. Nice, but probably not representative of your team’s brand. DO NOT EDIT THIS STYLESHEET. Not only might you make a mistake that messes up your site, but when you install an updated version of the plugin any changes you may have made will be erased. Instead create a customized stylesheet in the theme’s (or preferably child theme’s) main directory. This file MUST be namedmstw-tr-custom-styles.css
. The plugin loads its stylesheet,/css/mstw-tr-styles.css
, then attempts to load the custom stylesheet,mstw-tr-custom-styles.css
, from the theme’s (or preferably child theme’s) main directory. It will load them in that order if both exist. Add your customizations to themstw-tr-custom-styles.css
stylesheet. This allows one to fall back to the original file if necessary, and the customized file will not be over-written when a new version of the plugin is installed. If you are using a child theme (and unless you wrote your own theme you should be) the customizations will not be overwritten when the theme is updated. Code snippets for the stylesheet customizations on the MSTW Dev site are available to Gold Support members. - Player Profile and Player Gallery Page Templates. The plugin’s two custom page templates –
single-player.php
andtaxonomy-team.php
– are located in the plugin’s/theme-templates
directory. The plugin was developed and tested on the Twenty Eleven and Twenty Twelve themes. It is likely that CSS modifications, and in rare occasions code changes to these page templates, will be necessary to make them “fit nicely” and “look pretty” in other themes. To customize these templates copy the template(s) from/theme-templates
to the theme’s (or preferably child theme’s) main directory, and make the desired customizations there. This will allow one to fall back to the original file(s) if necessary, and the customized files will not be over-written if a new version of the plugin is installed. If you are using a child theme, and you probably should be, the customizations will not be overwritten if the theme is updated either. - Player Photos. The shortcodes and page templates use the following logic to display player photos:
- Uses the player’s Featured Image, if present.
- Uses the logo for the team in the MSTW Schedules & Scoreboards database, if team is linked and logo is present.
- Uses
default-logo-[team-slug].png
in the plugin’simages/default-images
, if present. - Uses
default-photo.png
in the plugin’simages/default-images
(a “mystery man”, which is loaded with the plugin.
- Team Logos. The shortcodes and page templates use the following logic to display team photos:
- Uses the logo for the team in the MSTW Schedules & Scoreboards or MSTW League Manager database, if team is linked and a logo is present in that database.
- use the file
default-logo-[team-slug].png
in the theme’s (or preferably child theme’s)/team-rosters/images/
directory (which you have to create), if it exists. - Uses
default-logo-[team-slug].png
in the plugin’simages/default-images
, if it exists.