Title: Offensive and defensive
Last modified: November 10, 2024

---

# Offensive and defensive

 *  Resolved [plou](https://wordpress.org/support/users/plou/)
 * (@plou)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/offensive-and-defensive/)
 * Hello Savvas,
 * 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 just saw that this issue has already been mentioned here, unfortunately without
   a response: [https://wordpress.org/support/topic/hide-stats-for-offense-defense-goalie/](https://wordpress.org/support/topic/hide-stats-for-offense-defense-goalie/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Savvas](https://wordpress.org/support/users/savvasha/)
 * (@savvasha)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/offensive-and-defensive/#post-18124961)
 * Hi there [@plou](https://wordpress.org/support/users/plou/) ,
 * 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](https://savvasha.com/contact).
 * Thanks,
   Savvas
 *  Thread Starter [plou](https://wordpress.org/support/users/plou/)
 * (@plou)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/offensive-and-defensive/#post-18125138)
 * Hello,
 * Here’s how to quickly set up a test environment.
 * **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!
 *  Plugin Author [Savvas](https://wordpress.org/support/users/savvasha/)
 * (@savvasha)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/offensive-and-defensive/#post-18125382)
 * Hi there [@plou](https://wordpress.org/support/users/plou/) ,
 * I am still not able to see what is not working correctly with the plugin and 
   the offense->defense stats. See below:
 * ![](https://i0.wp.com/snipboard.io/UNfoAM.jpg?ssl=1)
 * Are you currently using it on your site and having problems?
 * Thanks,
   Savvas
 *  Thread Starter [plou](https://wordpress.org/support/users/plou/)
 * (@plou)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/offensive-and-defensive/#post-18125416)
 * Hello,
 * 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”.
 * Sorry for the inconvenience.
 *  Plugin Author [Savvas](https://wordpress.org/support/users/savvasha/)
 * (@savvasha)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/offensive-and-defensive/#post-18127175)
 * Hi there [@plou](https://wordpress.org/support/users/plou/) ,
 * Please give a look at the following patch:
 * [https://github.com/ThemeBoy/SportsPress/commit/831f7e8648627e3e0337522157be53ba971e7c76](https://github.com/ThemeBoy/SportsPress/commit/831f7e8648627e3e0337522157be53ba971e7c76)
 * Thanks,
   Savvas

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Offensive and defensive’ is closed to new replies.

 * ![](https://ps.w.org/detailed-player-stats-for-sportspress/assets/icon.svg?rev
   =2838718)
 * [Detailed Player Stats for SportsPress](https://wordpress.org/plugins/detailed-player-stats-for-sportspress/)
 * [Support Threads](https://wordpress.org/support/plugin/detailed-player-stats-for-sportspress/)
 * [Active Topics](https://wordpress.org/support/plugin/detailed-player-stats-for-sportspress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/detailed-player-stats-for-sportspress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/detailed-player-stats-for-sportspress/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Savvas](https://wordpress.org/support/users/savvasha/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/offensive-and-defensive/#post-18127175)
 * Status: resolved