As you know, there are two types of statistics in WordPress: ‘offensive’ and ‘defensive.’ Player positions can be either ‘offensive,’ ‘defensive,’ or both.
Unfortunately, this plugin does not allow for a distinction between offensive and defensive statistics. If you have a player in a defensive position, it will display all statistics (both offensive and defensive), when ideally it should only show the defensive ones.
However, once this plugin is deactivated, the base plugin (Sportspress) correctly makes this distinction. A player with a defensive position will only display defensive statistics.
Would it be possible to fix this bug? Thank you. 🙂
I don’t have experience with sports that use offensive and defensive statistics, so it’s not easy for me to create a test environment to implement this feature in my plugin. Could you please assist me with this? Feel free to send me a message at savvasha.com/contact.
Step One Create a position (/wp-admin/edit-tags.php?taxonomy=sp_position) with offensive statistics, and another position with defensive statistics. For example:
Position: Forward, offensive statistics.
Position: Goalkeeper, defensive statistics.
Step Two Create statistics (/wp-admin/admin.php?page=sportspress-config) for each type, offensive and defensive. For example, let’s create two “Player Performance” types:
Performance 1: Goals scored, under offensive statistics.
Performance 2: Goals conceded, under defensive statistics. For both performances, remember to check the box to make them visible in player profiles.
Step Three Create a player with the forward position, for example, Wayne Rooney, and another player with the goalkeeper position, for example, Fabien Barthez.
Step Four In the Sportspress configuration page (/wp-admin/admin.php?page=sportspress&tab=players), check the “Offensive → Defensive” box.
Normally, if you go to Wayne Rooney’s player page, you should see the number of goals he has scored, as it is an offensive statistic. The number of goals conceded will not be visible. Conversely, on Fabien Barthez’s page, only goals conceded will be visible.
This setup works well with the Sportspress plugin, but not with your plugin. All statistics are visible without distinction between offensive and defensive.
Thank you in advance for your help, and thank you for all the development work you do for Sportspress!
Yes, actually I think there is a problem with my Sportspress installation, I can’t choose which statistics (offensive or defensive) to assign to the positions. When I save, the box remains empty. I will investigate and find the origin of the “bug”.