Skip to main content

Importing Events via CSV

SportsPress includes a built-in CSV importer for events. Go to **Tools → Import**, select **Events (CSV)**, and upload your file.

Updated today

Importing Events via CSV

SportsPress includes a built-in CSV importer for events. Go to Tools → Import, select Events (CSV), and upload your file.

Before You Import

The importer greet screen links to a sample CSV file (dummy-data/events-sample.csv in the SportsPress plugin directory) and notes that it supports CSV files exported from LeagueLobster.

Import Options

Before mapping columns, the importer presents the following options:

  • Format — Radio buttons for the event format (League, Friendly, Tournament, etc.). All imported events receive this format.

  • League — Dropdown of existing leagues. All imported events are assigned to this league. Leave at — Not set — to import without a league.

  • Season — Dropdown of existing seasons. All imported events are assigned to this season. Leave at — Not set — to import without a season.

  • Date Format — Radio buttons to match your CSV file's date column:

    • yyyy/mm/dd (default)

    • dd/mm/yyyy

    • mm/dd/yyyy

CSV Structure

The CSV uses a multi-row-per-event format. Events, teams, and players each occupy separate rows. A new event begins whenever a Date value appears.

Column Reference

Column

Required

Notes

Date (post_date)

Required for new events

Triggers creation of a new event row. Must match the selected date format.

Time (post_time)

Optional

24-hour format (HH:MM). Defaults to 0:00:00 if omitted. Combined with Date on save.

Venue (sp_venue)

Optional

Venue name as text. Matched to existing venues; new venues are created automatically.

Teams (sp_team)

Optional

Team name. Enter home team on the date row; additional teams go on separate rows with blank dates. New teams are created automatically if no match is found.

Results (sp_results)

Optional

Score for the team on that row. Use pipe `

separators for multiple result variables (e.g., 1

2` for first half and goals). Values map to result variables in the order they were configured.

Outcome (sp_outcome)

Optional

Outcome label for the team on that row. Use pipe `

` separators for multiple outcomes. New outcomes are created automatically.

Players (sp_player)

Optional

Player name. Enter first player on the team row; additional players go on subsequent rows with blank dates and team names. New players are created automatically.

Performance stats

Optional

One column per configured performance variable (Goals, Assists, etc.), in the same order as configured. Enter values on the player's row.

Row Layout

Events use a three-level hierarchy within the CSV:

  1. Event row — Contains Date, Time, Venue, and optionally the first Team, Result, Outcome, and first Player.

  2. Team rows — Additional teams listed on rows with a blank Date. Each team row can also carry the first player for that team.

  3. Player rows — Additional players for the most recent team, on rows with blank Date and Team values.

Auto-Creation Behavior

  • Teams — If a team name from the CSV does not match an existing team (by title), a new team post is created and published.

  • Venues — If a venue name does not match an existing venue term, a new sp_venue taxonomy term is created.

  • Outcomes — If an outcome label does not match an existing outcome post, a new sp_outcome post is created.

  • Players — If a player name does not match an existing player post, a new sp_player post is created. Players are also automatically linked to their team (current team is set if not already assigned).

After Import

The importer reports the number of events imported and skipped. Click View Events to verify the results.

Did this answer your question?