List player by team
-
Hello, is it possible to retrieve the list of players but by teams? And not a global list …
Thank you
-
Hi there!
Sure:
https://support.themeboy.com/category/327-getting-started
https://support.themeboy.com/article/38-creating-player-listsYou can use the team option in the rightside to load only players from a specific team:
https://prnt.sc/1yx7jsrThanks!
ok but I’m not sure I understand … in fact I wanted to know if there was a shortcode allowing to display the players by team (but without having to recreate lists because I have a lot of teams and therefore of players )
I use filters in shortcodes all the time to get different outputs from a single player list. You can do it via a dropdown in the classic editor, and it will figure out the different ids for you. Syntax example as follows (the keyword in the filter is “team” – in this example I also filtered by season and league).
[player_list id=”2196″ title=”Filter as needed” team=”2137″ seasons=”33″ leagues=”3″ columns=”number,team,position,starts,subs,mom,pts” orderby=”name” order=”” show_all_players_link=”0″ align=”none”]
-
This reply was modified 4 years, 7 months ago by
welshrunner.
Cool ! I did not know the power of the shortcode! On the other hand, how do you find the IDs of each team?
If you have the Classic editor, you can just use the SportsPress Shortcode Generator. Even if you don’t, a nice little trick is to go edit an “Event” or a “Team” and you will also find it on the edit window there – just pick your filters, generate the code and cut and paste it.
Finally, if you just go to the edit page for a Team, the id code is in the URL. I just keep a list of the teams, leagues and season ids in a handy little spreadsheet for quick reference.
thank you for these valuable tips! Do you have an example of your spreadsheet?
Spreadsheet is pretty simple, just a series of ID/label pairs across the columns, and details down the rows
Id,Team (columns A and b)
2000,Team A
2001,Team B
2002,Team CId,Season (columns D and E)
30,2021
40,2022Id,League (columns G and H)
1,League A
2,League B” in fact I wanted to know if there was a shortcode allowing to display the players by team”
As welshrunner said, you can use the shortcode generator to create your own shortcodes manipulating the player lists.
Thanks!
-
This reply was modified 4 years, 7 months ago by
The topic ‘List player by team’ is closed to new replies.