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
[mstw_league_schedule_2 league=league-slug season=season-slug]

League Schedule Galleries
[mstw_league_schedule_gallery 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]

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

  3. Only league games are displayed by default. To display non-league games, add the argument:

    show_nonleague=1

    to the shortcode incantation.

  4. Front end output can be configured via the Settings admin screen, numerous shortcode arguments, and via CSS styling.
  5. 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 necessary 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. But typically all the leagues would have a common season (year), which is what the display is all about.

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

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.

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

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"]

Date-Time Arguments

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

games_to_show specifies the number of games to display on the screen (without scrolling the ticker or slider). In the ticker above, games_to_show is 8, in the slider below it is 5. The default is 3.

start_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. start_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. 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 start_dtg. (It should not appear in the same argument list with last_dtg.) So for example,

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