“Advanced H2H for SportsPress” is a WordPress plugin that enhances the functionality of the SportsPress plugin by providing an advance way to handle sorting criteria and head-to-head situations. This plugin allows users to add advanced custom sorting criteria to each League Table. The data is presented in a clear and organized way, making it easy to analyze and compare teams performance over a season. This plugin is ideal for sports teams, leagues, and organizations.
This plugin is designed to work in conjunction with the SportsPress plugin, which is a popular sports management plugin for WordPress.
Overall, “Advanced H2H for SportsPress” is a powerful tool for sports teams and organizations that want to use either simple or complex sorting criteria for their teams or players.
== How to Use ==
= Step 1: Create Sorting Criteria =
- Go to SportsPress -> Teams -> Sorting Criteria in your WordPress admin.
- Click “Add New Criterion”.
- Give your criterion a descriptive name (e.g., “Premier League Style”, “Champions League Rules”).
= Step 2: Configure Regular Order =
In the “Regular Order” section:
- Drag and drop the columns in the order you want them to be considered for initial sorting.
- Toggle the switch to disable criteria you do not want.
- Set sort direction (Ascending/Descending) for each column.
This determines the primary sorting order.
= Step 3: Configure Tiebreak Order =
In the “Tiebreak Order” section:
- Drag and drop columns in the order they should be used for tiebreakers.
- Toggle the switch to disable criteria you do not want.
- Set sort direction for each column.
- Enable the “H2H Only” checkbox for columns that should only consider head-to-head results.
This determines how teams are ranked when they have the same points.
= Step 4: Review the Summary =
The “Sorting Criteria Summary” sidebar shows:
- Your configured regular order.
- Your configured tiebreak order.
- A clear overview of your sorting rules.
= Step 5: Apply to League Tables =
- Go to SportsPress -> Tables.
- Edit an existing league table or create a new one.
- In the sidebar, find the “Advanced Sorting Criteria” meta box.
- Select your custom sorting criterion from the dropdown.
- Save the league table.
= Examples =
Premier League Style:
- Regular Order: Points (DESC), Goal Difference (DESC), Goals For (DESC)
- Tiebreak Order: Points (DESC), Goal Difference (DESC), Goals For (DESC), Goals Away (DESC)
Champions League Style:
- Regular Order: Points (DESC), Goal Difference (DESC), Goals For (DESC)
- Tiebreak Order: Points (DESC), Head-to-Head Points (DESC), Head-to-Head Goal Difference (DESC), Goal Difference (DESC)