Skip to main content

Cricket Sport Features

Beyond terminology, the Cricket plugin adds four cricket-specific behaviours: extras tracking, separate DNB display, score-status output, and customisable result formatting.

Updated today

Cricket Sport Features

Beyond terminology, the Cricket plugin adds four cricket-specific behaviours: extras tracking, separate DNB display, score-status output, and customisable result formatting.

Extras row

Cricket scorecards traditionally include an "Extras" row totalling byes, leg byes, wides, and no-balls. The plugin adds:

  • A row to the performance table footer via sportspress_event_performance_meta_box_table_footer (priority 10) on the admin side

  • A matching row on the frontend via sportspress_event_performance_table_footer (priority 10)

  • Extras values are added to team totals via sportspress_event_performance_table_total_value (priority 10)

  • Forces the footer to be visible via sportspress_event_performance_show_footer (returns true)

Did Not Bat (DNB) display

Cricket convention lists batters who did not bat as part of the squad but separately from the active line-up. The plugin renders the DNB list after the main performance table via sportspress_after_event_performance_table. The substitute terminology is also remapped — see Terminology.

Score-status output

Cricket match results are typically expressed as "won by X runs" or "won by X wickets". The plugin adds output for this status via sportspress_after_event_logos and gates it behind the Show score status event-logo option.

To enable:

  1. Go to SportsPress → Settings → Events.

  2. Tick Show score status.

  3. Save.

Customisable result formatting

The plugin filters several result-display hooks to allow cricket-specific formatting:

  • sportspress_event_logos_team_result

  • sportspress_event_team_result_admin

  • sportspress_calendar_team_result_admin

  • sportspress_event_list_main_results

  • sportspress_event_blocks_team_result_or_time

  • sportspress_main_results_or_time

  • sportspress_main_results

Two settings control the formatting:

Setting

Effect

Results delimiter

The character used between team scores (default: -; cricket sites often use / or & for declared innings)

Reverse results format

When ticked, displays results with the away team's score first

Both settings live alongside Show score status in the event-logo options.

Frontend assets

  • js/sportspress-cricket.js — Provides cricket-specific frontend behaviour

  • css/sportspress-for-cricket.css — Styles the extras row and DNB list

Admin assets (css/admin.css, js/admin.js) are loaded only on sp_event and edit-sp_event screens to keep admin pages otherwise unaffected.

Did this answer your question?