Skip to main content

Golf Sport Features

Beyond terminology, the Golf plugin adds four golf-specific behaviours: hole count tracking, par totals, scoring equation variables, and result formatting relative to par.

Updated today

Golf Sport Features

Beyond terminology, the Golf plugin adds four golf-specific behaviours: hole count tracking, par totals, scoring equation variables, and result formatting relative to par.

Hole count

Each round (event) gains a Holes number input on the event details meta box. The input shows 18 as a placeholder hint — leave it empty and the event details display falls back to 18; enter any value (e.g. 9 for a short course) to override.

The hole count is used to:

  • Limit the performance table to that many score columns via sportspress_event_performance_labels

  • Display the hole count in the round's frontend details panel via sportspress_event_details

The value is stored under the sp_holes post meta key.

Par row

The performance table footer displays a Par row above the player rows, showing the par value for each hole or column. The row is added via:

  • sportspress_event_performance_meta_box_table_footer (priority 10) on the admin side

  • sportspress_event_performance_table_footer (priority 10) on the frontend

  • The footer is forced visible via sportspress_event_performance_show_footer

Par values are entered as part of the round configuration alongside hole numbers.

Equation variables

The plugin adds two variables to the SportsPress equation builder via sportspress_equation_options:

  • $strokes — Total strokes for the round

  • $par — Total par for the round

These can be combined in equations to compute over/under par. For example, a leaderboard sort equation of $strokes - $par produces a score relative to par (e.g. -3 for three under par).

The variables are also resolved in result equations via sportspress_event_result_equation_vars.

Result formatting

The plugin filters sportspress_event_results to format round results in golf terms — e.g. +2, E, -5 — based on the strokes-vs-par calculation, replacing raw numeric scores.

What the plugin does NOT add

  • No widgets

  • No new template sections

  • No settings page

  • No shortcodes

The golf-specific behaviours all live on top of SportsPress's existing event and performance hooks.

Did this answer your question?