Team Rosters Table [shortcode]

The Team Rosters Table layout is controlled by three factors in the following order:

  1. the [mstw-tr-roster] shortcode format argument, or if not specified,
  2. the remaining [mstw-tr-roster] shortcode arguments, or if not specified,
  3. the global default settings in the plugin’s Display Settings admin screen.

The default settings for all roster tables on a site may be set on the plugin’s Display Settings page. This approach works well for single team or single sport sites. The [shortcode] arguments for individual tables override the plugin’s default Display Settings. So each roster can have a unique format.

Note that shortcode’s roster_type argument also overrides the display settings AND the other [shortcode] arguments. If you wish to use a custom roster format, you must omit the format argument or set it to ‘custom’.

The available roster types are described below:

roster_type fields(columns) displayed
high-school Number, Name, Position, Height, Weight, Year
college Number, Name, Position, Height, Weight, Year, Experience, Hometown(Last School)
pro Number, Name, Position, Height, Weight, Age, Experience, Last School(Country)
baseball-pro
baseball-college
baseball-high-school
Baseball formats add a Bats/Throws column after the Position column

The arguments are available for use with the [mstw-tr-roster] shortcode and their defaults are listed below. In all the ‘show’ arguments, 1 means show the data field or column and 0 means hide it. Remember that the data columns are very flexible, so the descriptions only indicate the intent for the field or column. For example, one could use the “Height” field to show the Salary of each player simply by relabeling it appropriately and entering each player’s salary in the Height field. Several sample rosters and their arguments are shown at the end of this page.

$defaults = array(
‘team’ => ‘no-team-specified’,
‘show_title’ => 1,
‘roster_type’ => ‘custom’,
‘use_player_links’ => 0,
‘use_gallery_links’ => 0,
‘use_pg_links’ => 0,
‘sort_order’ => ‘alpha’,
‘name_format’ => ‘last-first’,
‘name_label’ => __( ‘Name’, ‘mstw-loc-domain’ ),
‘show_photos’ => 0,
‘show_number’ => 1,
‘number_label’ => __( ‘Nbr’, ‘mstw-loc-domain’ ),
‘show_position’ => 1,
‘position_label’ => __( ‘Pos’, ‘mstw-loc-domain’ ),
‘show_height’ => 1,
‘height_label’ => __( ‘Hgt’, ‘mstw-loc-domain’ ),
‘show_weight’ => 1,
‘weight_label’ => __( ‘Wgt’, ‘mstw-loc-domain’ ),
‘show_year’ => 0,
‘year_label’ => __( ‘Year’, ‘mstw-loc-domain’ ),
‘show_experience’ => 0,
‘experience_label’ => __( ‘Exp’, ‘mstw-loc-domain’ ),
‘show_age’ => 0,
‘age_label’ => __( ‘Age’, ‘mstw-loc-domain’ ),
‘show_home_town’ => 0,
‘home_town_label’ => __( ‘Home Town’, ‘mstw-loc-domain’ ),
‘show_last_school’ => 0,
‘last_school_label’ => __( ‘Last School’, ‘mstw-loc-domain’ ),
‘show_country’ => 0,
‘country_label’ => __( ‘Country’, ‘mstw-loc-domain’ ),
‘show_bats_throws’ => 0,
‘bats_throws_label’ => __( ‘Bat/Thw’, ‘mstw-loc-domain’ ),
‘show_other_info’ => 0,
‘other_info_label’ => __( ‘Other’, ‘mstw-loc-domain’ ),
);

Cal Bears College Format

 

Boston Celtics Pro

 

SF Giants Pro Baseball

 

St Marys High School

 

Office Staff Custom Format