Shortcodes

The following shortcodes for front end displays are described below.

STANDINGS

League Standings
[mstw_league_standings league=league-slug season=season-slug]

League Multi Standings
mstw_multi_league_standings leagues='league-1,league-2']

SCHEDULES

League Schedule Tables
[mstw_league_schedule_table league=league-slug season=season-slug]

League Schedule Tables 2 (Alternative)
[mstw_league_schedule_2 league=league-slug season=season-slug]

Multi Schedule Table
[mstw_multi_schedule_table leagues='league-slug-1,league-slug-2,...]|sport=sport-slug]

League Schedule Galleries
[mstw_league_schedule_gallery league=league-slug season=season-slug]

League Schedule Galleries 2 (Alternative)
[mstw_league_schedule_gallery_2 league=league-slug season=season-slug]

League Schedule Tickers
[mstw_league_schedule_ticker league=league-slug season=season-slug]

League Schedule Sliders
[mstw_league_schedule_slider league=league-slug season=season-slug]

Team Schedule Tables
[mstw_team_schedule team=team-slug league=league-slug season=season-slug]

Team Schedule Tables 2 (Alternative)
[mstw_team_schedule_2 team=team-slug season=season-slug]

Multi-Team Schedules (v2.6+)
[mstw_multi_team_schedule team=team-slug or teams='team-a-slug,team-b-slug' league='league-slug or seasons='season-a-slug,season-b-slug']

Schedule Date & Time Arguments

LOCATIONS/VENUES

Location(Venue)Tables
[mstw_location_table]

GENERAL NOTES

    1. A league slug and season slug are required for most of the shortcodes. The league slugs are available on the Leagues admin screen. If you omit the league slug, you get an error message displayed. The season slugs are available on the Seasons admin screen. (Be sure to select the correct league!) If you omit the season slug, the plugin will grab the first season and take a shot.
  1. In general, both the league and season arguments support collections of slugs. For example:
    league='league-1,league-2,league-3' season='season-1,season-2'

    will result in all the entries for league-1, league-2, and league-3 in both season-1 and season-2. If league-3, say, does not have a season-1 or season-2, then no games from league-3 will be displayed.

  2. All games, league and nonleague are displayed by default. To display only league games, add the argument:
    show_nonleague=0

    to the shortcode incantation.

  3. Front end output can be configured via the Settings admin screen, numerous shortcode arguments, and via CSS styling.
  4. Multiple schedule shortcodes support several date-time arguments to control the games that are displayed by game date and time.

League Standings Tables

League standings tables are basic league standings displays. The short code incantation is:
[mstw_league_standings league=league-slug season=season-slug]

League Standings Table

League Multi-Standings Tables

Depending on how leagues are organized, it is sometimes useful to display multiple leagues in one standings table on the same screen real estate. League multi-standings tables offers this ability. The shortcode builds a league select list from the ‘leagues’ argument, creates a season select list from the seasons for each of the leagues, and displays a schedule table. The short code incantation is:
[mstw_multi_league_standings league='league-1,league-2,league-3']
Seasons are not necessary, because they are built from the league that is selected.

This shortcode is frequently used to display archived information. For example, one might display the current season standings for a given league, with a season select control that allows one to view the standings from previous seasons.

NOTE: More than one instance of the mstw_multi_league_standings shortcode on a page will cause unexpected behavior! Multiple instances of the mstw_multi_league_standings and mstw_multi_schedule_table shortcodes on a page will also cause unexpected behavior.

Multi Standings

League Schedule Tables

Schedule tables are basic schedule displays. The shortcode is:
[mstw_league_schedule_table league=league-slug season=season-slug]

League Schedule Table

League Schedule Tables 2(Alternative)

The second league schedule shortcode displays a league schedule for all TEAMS in the specified league, not GAMES in the specified league. The shortcode finds all the TEAMS in the specified league(s), and then finds all the GAMES for those TEAMS in the specified season. The shortcode is:
[mstw_league_schedule_2 league=league-slug season=season-slug]

The output is the same as the schedule table shown above.

While the difference may be minor, this shortcode can greatly simplify the incantation, and some view it as the “right” way to specify the schedule. However, it can also limit options to organize and display leagues by division and conference. What’s “right” or “natural” really depends on how a site organizes its teams in its leagues.

Multi-Schedule Table

Depending on how leagues are organized, it is sometimes useful to display multiple leagues and seasons in one schedule table on the same screen real estate. League multi-schedule tables offers this ability. The shortcode builds a league select list from the ‘leagues’ argument, creates a season select list from the seasons for each of the leagues, and displays a schedule table. The short code incantation is:
[mstw_multi_schedule_table leagues='league-1,league-2,league-3']

Seasons are not necessary, because they are built from the league that is selected. But typically all the leagues would have a common season (year), which is what the display is all about.

There is also an option to provide a sport argument instead of a leagues argument. The shortcode will then display all the leagues for the given sport in the league select control. The short code incantation is:
[mstw_multi_schedule_table sport='football-ncaa']

This shortcode is frequently used to display archived information. For example, one might display the current season’s schedule for a given league, with a season select control that allows one to view the schedules (and results) from previous seasons.

NOTE: More than one instance of the mstw_multi_schedule_table shortcode on a page will cause unexpected behavior! Multiple instances of the mstw_multi_league_standings and mstw_multi_schedule_table shortcodes on a page will also cause unexpected behavior.

League Schedule Galleries

Schedule galleries are commonly used alternative layout of the schedule tables. The short code incantation is:
[mstw_league_schedule_gallery league=league-slug season=season-slug]

League Schedule Gallery

League Schedule Galleries 2 (Alternative)

The second league schedule gallery shortcode displays a league schedule for all TEAMS in the specified league, not GAMES in the specified league. The shortcode finds all the TEAMS in the specified league(s), and then finds all the GAMES for those TEAMS in the specified season. The shortcode is:
[mstw_league_schedule_gallery_2 league=league-slug season=season-slug]

The output is the same as the schedule gallery shown above.

While the difference may be minor, this shortcode can greatly simplify the incantation, and some view it as the “right” way to specify the schedule. However, it can also limit options to organize and display leagues by division and conference. What’s “right” or “natural” really depends on how a site organizes its teams in its leagues.

League Schedule Tickers

The short code incantation is:
[mstw_league_schedule_ticker league=league-slug season=season-slug]

League Ticker

League Schedule Sliders

The short code incantation is:
[mstw_league_schedule_slider league=league-slug season=season-slug]

League Slider

Team Schedule Tables

The short code incantation is:
[mstw_team_schedule team=team-slug league=league-slug season=season-slug]

Team Schedule Table

This shortcode supports some arguments for tagging home games and league games with symbols, e.g., asterisks or daggers. First, set show_home_away to 1, then specify the symbols with star_home and/or star_league. For example, to specify home games with a star(*) and league games with a dagger(†):

show_home_away = 1 star_home = '*' star_league='†'

You can then add a note to your table stating that home games are designated with * and league games are designated with †.

There are also CSS tags for styling home and away games (rows): .home-game and .away-game.

Team Schedule Tables 2 (Alternative)

The second team schedule shortcode displays a schedule for a team and season, no league is specified. The shortcode finds all the GAMES for the specified team in the specified season, regardless of the game’s league. The shortcode is:
[mstw_team_schedule_2 team=team-slug season=season-slug]

The output is the same as the schedule table shown above.

Multi-Team Schedule Tables (v2.6+)

The short code incantation is:
[mstw_multi_team_schedule team=team-slug or teams='team-a-slug,team-b-slug' league=league-slug or seasons='season-a-slug,season-b-slug']

Team Schedule Table

The intent is to display an archive of team schedules/results by season. However, a number of arguments and options are supported as described below.

team|teams – these arguments are interchangeable. The original intent was that only one team slug would be provided, then the user could select seasons for that team with the seasons dropdown. If multiple teams are provided, then both a team and a season can be selected.

league – if a league slug is specified, all the seasons for the league will be available in the seasons drop-down control, so a seasons argument is redundant. If ONLY a league argument is specified, then all the league’s teams and seasons will appear in the drop-down controls.

seasons – the seasons argument may be used to specify the seasons available in the seasons drop-down control. This is useful if all the teams are not in the same league so only may not choose to show all the seasons related to one league.

current_season – the season to display. (Note that if multiple teams, the first team in the list is always displayed.)

Note that the shortcode uses the mstw_team_schedule_2 shortcode to display the schedule tables. In addition, the shortcode supports the other arguments supported by the team schedules shortcodes.

Schedule Date-Time Arguments

Schedule shortcodes support the following arguments to control the games that are displayed by date and time.

games_to_show is no longer necessary. The sliders and tickers fit themselves to the available space, so it is ignored.

first_dtg specifies the first or earliest date and time that will be included in the ticker or slider. The format is YYYY-MM-DD HH:MM. first_dtg can also be set to now, so that the slider will always being at the current (WordPress server) time.

last_dtg specifies the last or latest date and time that will be included in the ticker or slider, and can be set in two ways. A date-time may be specified in the format is YYYY-MM-DD HH:MM, and it must be in quotes due to the space. Or, an interval from the first_dtg may be specified in days in the format ‘+7’. The plus sign is required.

interval_days specifies a time interval in days around the specified first_dtg. (It should not appear in the same argument list with last_dtg.) So for example,

first_dtg='now' interval_days=14

will display all games that are within 14 days of the current date and time. Note that this is different than using something like last_dtg='+14', which will include games 14 days into the future from the specified first_dtg.

Location(Venue) Tables

The short code incantation is:
[mstw_location_table]

Venue Shortcode

The shortcode has one optional argument that displays a specific venue group (or groups):

venue_group = "group-slug-1,group-slug-2"

The shortcode for the screenshot above is [mstw_location_table venue_group="pac-12"]