Title: View statistics
Last modified: May 28, 2024

---

# View statistics

 *  Resolved [marocco](https://wordpress.org/support/users/marocco/)
 * (@marocco)
 * [2 years ago](https://wordpress.org/support/topic/view-statistics/)
 * Hello,
 * Is it possible to have in the player’s file the matches where the player has 
   played, the goals or the cards?
 * Example:
   [https://info.betting.co.zw/player/alexis-sanchez/?sid=25693#stab_statistic](https://info.betting.co.zw/player/alexis-sanchez/?sid=25693#stab_statistic)
 * On this page I can see at a glance when the player has played.
 * Today on my page I have this
 * [https://www.mountakhab.net/player/monir-el-kajoui-fr/stats/](https://www.mountakhab.net/player/monir-el-kajoui-fr/stats/)
 * To give it more color and clarity, I prefer to display it as in my example
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fview-statistics%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [plou](https://wordpress.org/support/users/plou/)
 * (@plou)
 * [2 years ago](https://wordpress.org/support/topic/view-statistics/#post-17790120)
 * Hello,
   There is a plugin called “Detailed Player Stats for SportsPress” created
   by [@savvas](https://wordpress.org/support/users/savvas/).
 *  [RobJr](https://wordpress.org/support/users/robjr14/)
 * (@robjr14)
 * [2 years ago](https://wordpress.org/support/topic/view-statistics/#post-17792876)
 * The detailed player stats for Sportspress created by [@savvas](https://wordpress.org/support/users/savvas/)
   works out of the box with themes by Themeboy and default themes as well (I’m 
   guessing) but it does not work when using the theme that marocco is using (Alchemist).
   You would need to modify the template file to incorporate the detailed player
   stats into the Alchemist theme. – This is something I want to dive into but just
   don’t have the time – because I’d love to be able to use this plugin with this
   theme.
 * **Side Note**: If you’re also looking at using the “advanced h2h” to enhance 
   sportspress sorting capabilities (also created by [@savvas](https://wordpress.org/support/users/savvas/)),
   this is an easy fix to get it to work with the alchemist theme. You just need
   to modify a small piece of code in alchemist’s sportspress’ “league_table” template
   file to make that little helpful plugin work.
 * Now back to the detailed player stats – There is a little widget/element available
   with the Alchemist theme though that does allow you to list the specific game
   by game stats for your players. The issue is you have to manually add this widget
   to the player pages. The widget is called “ALC: Player Game-by-Game stats” Important
   to note that this will only pick-up the player’s CURRENT team. If the player 
   has both current and past teams under his profile, it won’t show the game-by-
   game stats of the past teams.
 * I did create a work-around for this by copy pasting the element and changing 
   the code so that it pulls the past_team info (instead of the current_team). But
   there are about 10-12 files that need to be copied/pasted + modified to create
   a secondary element for the past teams. The end-result is what you see in the
   picture.
 * [https://ibb.co/fx5VJJ7](https://ibb.co/fx5VJJ7)
    -  This reply was modified 2 years ago by [RobJr](https://wordpress.org/support/users/robjr14/).
    -  This reply was modified 2 years ago by [RobJr](https://wordpress.org/support/users/robjr14/).
 *  Plugin Contributor [Savvas](https://wordpress.org/support/users/savvasha/)
 * (@savvasha)
 * [2 years ago](https://wordpress.org/support/topic/view-statistics/#post-17798317)
 * Hi there,
 * The reason [Detailed Player Stats for SportsPress](https://wordpress.org/plugins/detailed-player-stats-for-sportspress/)
   is not compatible with Alchemist, is because that theme does major overrides 
   of SportsPress template files. During those overrides, any changes made by the
   plugin are gone… I am working on a way to make it compatible with Alchemist but
   with an open timeframe.
 * Thanks,
   Savvas
 *  [ozgurgedikli](https://wordpress.org/support/users/ozgurgedikli/)
 * (@ozgurgedikli)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/view-statistics/#post-17838511)
 * Hi there,
 * I just saw the Detailed Player Stats for SportsPress plugin, it’s very nice.
   
   It seems to be working perfectly now with the Alchemist theme.[@savvasha](https://wordpress.org/support/users/savvasha/)
   Thank you for this beautiful plugin, congratulations
 * [https://ibb.co/nL45Yx9](https://ibb.co/nL45Yx9)
 *  Plugin Contributor [Savvas](https://wordpress.org/support/users/savvasha/)
 * (@savvasha)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/view-statistics/#post-17838548)
 * Thank you [@ozgurgedikli](https://wordpress.org/support/users/ozgurgedikli/) 
   for your kind words 😊
 * [@robjr14](https://wordpress.org/support/users/robjr14/) can you try the latest
   update and see if it is working also at your Alchemist site?
 * The developer of Alchemist, Dan Fisher, was kind enough to provide me with a 
   developer license! It is a great theme and I am really happy I managed to make
   my plugin compatible with it!
 * Thanks, Savvas
 *  [RobJr](https://wordpress.org/support/users/robjr14/)
 * (@robjr14)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/view-statistics/#post-17838806)
 * thats amazing! I will be testing it out after work this evening. Will let you
   know how it goes!
 * Thank you!!!
 *  [RobJr](https://wordpress.org/support/users/robjr14/)
 * (@robjr14)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/view-statistics/#post-17839989)
 * [@savvasha](https://wordpress.org/support/users/savvasha/) I can confirm that
   both options (popup or inline) function with the Alchemist theme. I’ve played
   around with it a little bit and tried it on 2 separate installations – running
   different versions of both sportspress and Alchemist theme and everything seems
   good!
 * Amazing work!
 *  [ozgurgedikli](https://wordpress.org/support/users/ozgurgedikli/)
 * (@ozgurgedikli)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/view-statistics/#post-17840297)
 * [@robjr14](https://wordpress.org/support/users/robjr14/) Is there an example 
   of a view as inline? There may be an option to enhance the popup and inline plugin
   by adding it as an option to the sportspress player settings menu. What is the
   coding change you made?
 *  [RobJr](https://wordpress.org/support/users/robjr14/)
 * (@robjr14)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/view-statistics/#post-17840338)
 * [@ozgurgedikli](https://wordpress.org/support/users/ozgurgedikli/) – If you’re
   referring to the changes I made to create a 2nd “widget” for a players past teams
   in Alchemist – it involved about 12-14 files. Now, mind you – I’m not a programmer.
   I actually don’t know how to code but I am sometimes able to modify certain things
   and I was able to re-create the gbg stats widget and make that one use a players“
   past_team”. I know that there is a much much simpler way to make that main widget
   include both a players current and past teams, but since I am not a programmer–
   this was the only way I knew how to do it. I did reach out to Dan earlier today
   to ask about them potentially updating the widget so that it actually includes
   both current & past teams but I’m not sure if or when that would be done.
 * But I did not make any modifications to savvas’ detailed player stats plugin.
   With his latest update, the detailed player stats works out of the box with Alchemist.
 * Main changes were done to alc_player_stats.php on line 157. I copied Get Current
   Team and then re-pasted below but changed current_team to past_team
 *     ```wp-block-code
       // Get current team$sp_current_teams = get_post_meta( $id, 'sp_current_team' );$sp_current_team = '';if ( ! empty( $sp_current_teams[0] ) ) {	$sp_current_team = $sp_current_teams[0];}// Get Past team$sp_past_teams = get_post_meta( $id, 'sp_past_team' );$sp_past_team = '';if ( ! empty( $sp_past_teams[0] ) ) {	$sp_past_team = $sp_past_teams[0];}
       ```
   
 * I also copied the alc_player_gbg_stats.php in “/vc_template/ and named the copy“
   alc_player_gbg_stats_past.php” and in this file, I edited line 50 from…
 *     ```wp-block-code
       // Get player's current team(s)$team = get_post_meta( $player_id, 'sp_current_team' );Changed to:// Get player's past team(s)$team = get_post_meta( $player_id, 'sp_past_team' );
       ```
   
 * Also had to make a copy of Alchemist’s sportspress template file “player-event-
   game-by-game.php” and rename it “player-event-game-by-game-past.php” and change
   every line that had “current_team” to “past_team” – this file has I think 20 
   or 21 “current_team” occurrences that had to be changed to “past_team”
 * A variety of other files had to be edited so that this Past Team widget would
   be visible and functional in wpBakery. Those files are:
 * alchemist\languages\alchemists.pot
   alchemist\inc\vc-functions.phpalchemist\admin\
   images\js_composer\alc_player_gbg_stats.pngalchemist\assets\css\sportspress-soccer.
   css.mapalchemist\assets\css\sportspress-soccer-rtl.css.mapalchemist\sass\sportspress\
   player_player-game-by-game-stats.scssalchemist\sass\sportspress\player_player-
   game-by-game-stats–skin.scssalchemist\sass\sportspress.scssalchemist\sass\sportspress-
   skin.scssalchemist\sportspress\single-player.phpalchemist\config.codekit3alchemist\
   wpml-config.xml
 * Some of the above files were simply copied and renamed by adding “-past” to them,
   while others had to have lines added. All I’d do is copy the main code for the
   game-by-game stats and add it again and re-name it with “-past” or “_past” – 
   so it would point to the new files for “past_team”.
 * Hopefully what you were questioning is somewhere in what I wrote above.
    -  This reply was modified 1 year, 12 months ago by [RobJr](https://wordpress.org/support/users/robjr14/).
 *  [ozgurgedikli](https://wordpress.org/support/users/ozgurgedikli/)
 * (@ozgurgedikli)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/view-statistics/#post-17842952)
 * [@robjr14](https://wordpress.org/support/users/robjr14/) Thanks for the details.
   
   Alchemist theme Detailed Player Stats for SportsPress plugin works perfectly.
   These details give very good results in creating your own design theme.
 * [@savvasha](https://wordpress.org/support/users/savvasha/) with quick action 
   With the 1.7.1 update of the Detailed Player Statistics plugin for SportsPress,
   two different uses can now be set, pop-up and in-line, with the Detailed Season
   Statistics option in the Sporspress > Settings > Players tab. Thanks [@savvasha](https://wordpress.org/support/users/savvasha/)
   for this nice detailing

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

The topic ‘View statistics’ is closed to new replies.

 * ![](https://ps.w.org/sportspress/assets/icon-256x256.png?rev=1252005)
 * [SportsPress - Sports Club & League Manager](https://wordpress.org/plugins/sportspress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sportspress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sportspress/)
 * [Active Topics](https://wordpress.org/support/plugin/sportspress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sportspress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sportspress/reviews/)

 * 11 replies
 * 5 participants
 * Last reply from: [ozgurgedikli](https://wordpress.org/support/users/ozgurgedikli/)
 * Last activity: [1 year, 12 months ago](https://wordpress.org/support/topic/view-statistics/#post-17842952)
 * Status: resolved