Advanced H2H for SportsPress

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 =

  1. Go to SportsPress -> Teams -> Sorting Criteria in your WordPress admin.
  2. Click “Add New Criterion”.
  3. Give your criterion a descriptive name (e.g., “Premier League Style”, “Champions League Rules”).

= Step 2: Configure Regular Order =

In the “Regular Order” section:

  1. Drag and drop the columns in the order you want them to be considered for initial sorting.
  2. Toggle the switch to disable criteria you do not want.
  3. Set sort direction (Ascending/Descending) for each column.

This determines the primary sorting order.

= Step 3: Configure Tiebreak Order =

In the “Tiebreak Order” section:

  1. Drag and drop columns in the order they should be used for tiebreakers.
  2. Toggle the switch to disable criteria you do not want.
  3. Set sort direction for each column.
  4. 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 =

  1. Go to SportsPress -> Tables.
  2. Edit an existing league table or create a new one.
  3. In the sidebar, find the “Advanced Sorting Criteria” meta box.
  4. Select your custom sorting criterion from the dropdown.
  5. 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)