Description
Swissunihockey Web Components allows floorball clubs to integrate game schedules, results, rankings and other information into their WordPress websites. Data is retrieved from external services provided by swiss unihockey when a page is loaded.
The required JavaScript and CSS files are included in the plugin. No manual file uploads or manual integration of script tags are required.
Features
- League games and rankings
- Team games and club games
- Game schedules grouped by club teams
- Mobiliar top scorers
- Team overviews and team details
- Player lists, team statistics and spectator statistics
- Automatic default season selection with a season change in July
- Automatic league assignment based on a team ID for supported components
Required IDs
Club IDs (club-id), team IDs (team-id), league IDs (league), game class IDs (game-class) and group names (group) can be found using the official ID finder.
Using Shortcodes
Add a Shortcode block in the WordPress editor and use one of the following examples. Replace the example IDs with the IDs of your club or team.
-
League games (uniho-league-games)
[swissunihockey component=”uniho-league-games” team-id=”429494″ season=”2025″]
Alternatively, specify the league, game class and group:
[swissunihockey component="uniho-league-games" league="3" game-class="21" group="Gruppe 1" season="2025"]
Attributes: team-id, game-class, league, season, group.
-
Team games by club (uniho-club-team-games)
[swissunihockey component=”uniho-club-team-games” club-id=”372″ season=”2025″ page-size=”6″]
Attributes: club-id, season, page-size.
-
Games of an individual team (uniho-team-games)
[swissunihockey component=”uniho-team-games” team-id=”429626″ season=”2025″ page-size=”5″]
Attributes: team-id, season, page-size.
- Club games (uniho-club-games)
Displays the games of a club in a weekly overview.
[swissunihockey component="uniho-club-games" club-id="467" season="2025"]
Attributes: club-id, season.
-
Rankings (uniho-ranking)
[swissunihockey component=”uniho-ranking” team-id=”429494″ season=”2025″]
Alternatively:
[swissunihockey component="uniho-ranking" league="3" game-class="21" group="Gruppe 1" season="2025" view="full"]
Attributes: team-id, season, league, game-class, group, view. The default value for view is full.
-
Mobiliar top scorers (uniho-mobiliar-topscorer)
[swissunihockey component=”uniho-mobiliar-topscorer” club-id=”463845″ season=”2025″]
Without a club filter:
[swissunihockey component="uniho-mobiliar-topscorer" season="2025"]
Attributes: season, club-id. The additionally registered view-type attribute is not evaluated by the current React implementation. The API request uses table as its view type.
-
Team overview (uniho-teams)
[swissunihockey component=”uniho-teams” mode=”by_club” club-id=”467″ season=”2025″]
Attributes: team-id, mode, season, club-id, league, game-class.
-
Team details (uniho-team)
[swissunihockey component=”uniho-team” team-id=”429494″]
Attributes: team-id.
-
Player list (uniho-team-players)
[swissunihockey component=”uniho-team-players” team-id=”429494″]
Attributes: team-id.
-
Team statistics (uniho-team-statistics)
[swissunihockey component=”uniho-team-statistics” team-id=”429494″]
Attributes: team-id.
-
Spectator statistics (uniho-team-visitors)
[swissunihockey component=”uniho-team-visitors” team-id=”429494″ season=”2025″]
The team ID is used to determine the league and game class for the spectator statistics.
Attributes: team-id, season, league, game-class.
External Services
This plugin relies on external services provided by swiss unihockey to display sports data.
Requests are made directly from the visitor’s browser when an embedded component is loaded. Depending on the component, the transmitted data may include club IDs, team IDs, league IDs, game class IDs, seasons, group names and query parameters.
When an HTTP request is made, the respective server also receives the visitor’s IP address and standard browser and HTTP information as a technical requirement of the connection.
- https://wc.swissunihockey.ch/ – Provides API access to game schedules, rankings, top scorers and team data.
- https://myapp.swissunihockey.ch/ – Destination of links to additional sports information. A connection to this service is established when a visitor opens one of these links.
Service provider: swiss unihockey, https://www.swissunihockey.ch/.
Privacy policy: https://www.swissunihockey.ch/de/service/datenschutz
Terms of use for external services: https://www.swissunihockey.ch/de/administration/services/webmaster/
Source Code
The web components are based on React and are built using TypeScript and Vite. The compiled JavaScript and CSS files are included in the plugin.
The public source code of the included web components is available at:
https://github.com/swissunihockey/swissunihockey-webcomponents
Build Instructions
The web components can be built using Node.js and npm.
- Clone the web components repository.
- Open the React project directory.
- Run
npm ci. - Run
npm run build:wordpress. - Copy the generated JavaScript and CSS files from
the dist-wordpress directory into the assets
directory of the WordPress plugin.
The WordPress-specific build uses the React and
React DOM libraries provided by WordPress instead
of bundling separate copies of these libraries.
For standalone installations outside WordPress,
run npm run build.
Credits
Original development of the WordPress plugin: Markus Schenardi (Schenardi Consulting, Head of Club Administration).
Screenshots



Installation
- Open Plugins > Add New in your WordPress dashboard.
- Search for Swissunihockey Web Components.
- Install and activate the plugin.
- If required, open Settings > Swissunihockey and configure the default season.
- Open a page or post and add a Shortcode block containing the desired shortcode.
- Save the page and verify that the component is displayed correctly on the frontend.
Before publication in the WordPress Plugin Directory, the plugin can also be installed manually as a ZIP file via Plugins > Add New > Upload Plugin.
FAQ
-
How do I specify the season?
-
Use the starting year of the season. For example, the value for the 2025/26 season is 2025.
-
Do I need to specify the season in every shortcode?
-
No. For components that support the season attribute, the plugin uses the default season configured under Settings > Swissunihockey.
If no default season is configured, the plugin uses the previous calendar year from January to June and the current calendar year from July to December.
A valid season explicitly specified in a shortcode takes precedence over the default season.
-
Do I need to specify the league and game class if I know the team ID?
-
For league games, rankings, team overviews and spectator statistics, missing assignments can be determined automatically using the team ID.
-
What does page-size mean?
-
This attribute defines the number of games displayed per page in supported game overviews.
-
Can I use underscores instead of hyphens?
-
Yes. For example, team_id and team-id are treated identically.
-
Do I need an API key?
-
The plugin does not require users to enter an API key. Displaying the components requires the external services to be accessible and authorised for the respective website.
-
Why is no data displayed?
-
Check the IDs, season, shortcode and availability of the external services. If necessary, check the browser console for JavaScript or CORS errors.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Swissunihockey Web Components” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Swissunihockey Web Components” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Initial release for the WordPress Plugin Directory.
- Support for eleven web components using shortcodes.
- Local integration of JavaScript and CSS files.
- Configurable default season.
- Restriction to supported web components and attributes.
