Support » Plugin: SportsPress - Sports Club & League Manager » List player by team

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Roch


    Hi there!


    You can use the team option in the rightside to load only players from a specific team:


    Thread Starter olympiens80


    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 10 months, 3 weeks ago by welshrunner.
    Thread Starter olympiens80


    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.

    Thread Starter olympiens80


    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 C

    Id,Season (columns D and E)

    Id,League (columns G and H)
    1,League A
    2,League B

    Plugin Contributor Roch


    ” 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.


Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘List player by team’ is closed to new replies.