Match Stats
The Match Stats module adds an animated head-to-head team comparison chart to event pages. After results have been entered, it renders a series of stat bars comparing the two teams side by side — for example, shots on goal, possession, or any other configured performance variables. It is part of SportsPress Pro.
Enabling Match Stats
Match Stats is registered as an option under the event performance display section. The setting key is sportspress_event_show_statistics (default: yes).
To toggle it, go to SportsPress → Settings → Events and look for the Match Stats checkbox in the performance display options.
Display Modes
Match Stats has two display modes controlled by the existing sportspresseventperformance_mode setting:
Values (
values) — The default. Stat bars display numeric values.Icons (
icons) — When icons mode is active and Match Stats is enabled, a CSS classsp-inline-statisticsis added to the<body>tag on event pages that have results, which adjusts the display to show stats inline with icons.
Animation
The stat bars animate into view when they scroll into the viewport. This uses the jQuery Waypoints library. Animation is controlled by the sportspress_enable_animated_match_stats setting (default: yes).
To disable the animation, go to SportsPress → Settings → General and uncheck Match Stats in the scripts section. When animation is disabled, the Waypoints script and the Match Stats animation script are not enqueued.
Frontend Colors
If the active theme does not declare add_theme_support( 'sportspress' ), Match Stats outputs inline CSS to color the stat bars using the theme's configured primary and link colors:
.sp-statistic-bar— Background color set to the primary color..sp-statistic-bar-fill— Background color set to the link color.
Text Labels
The section heading Match Stats can be customized via SportsPress → Settings → Text.
