Install the WpFantasy plugin either via the WordPress.org plugin directory, or by uploading the files to your server.
You can download files HERE.
Activate the plugin through the ‘Plugins’ menu in WordPress.
You will see options to import players, clubs and leagues.
Create or edit a post/page and add the shortcode
[wp-fantasy]
After adding the shortcode, you will see three sections: “My Leagues,” “Last Created Leagues,” and “Leagues with Selected Teams.”
- “My Leagues” displays all the leagues you have created. For other users, it shows the leagues they have created themselves, allowing subscribers to manage their own leagues as well.
- “Last Created Leagues” lists all leagues created by any user, giving you a view of the most recently added leagues across the platform.
- “Leagues with Selected Teams” shows the leagues in which you have chosen to participate, highlighting the leagues where you are actively competing with others.
After activating the plugin, you’ll need to add your own clubs and players.
How To Add Your Own Clubs And Players
Once you activate the plugin, you will find the “Players” option in your admin dashboard. This section includes three sub-options:
- All Players – View a list of all players.
- Add New Player – Manually add a player by entering their name, price, and club.
- Export or Import Players – Bulk import players via CSV file upload.
To import players successfully, your CSV file must adhere to the following format:
Title,Position,Price,Club
Manuel Neuer,Goalkeeper,10,Bayern Munich
Marc-André ter Stegen,Goalkeeper,11,Bayern Munich
Oliver Baumann,Goalkeeper,12,Bayern Munich
For example, if Chelsea and Manchester United are playing in a few days, simply create a CSV file with players from both teams and upload it using the “Import Players” option.
Once you’ve imported players and clubs via CSV, you can proceed to create new leagues. As an admin, you also have the option to allow subscribers to create their own leagues, players, or clubs. This setting can be configured in the WordPress admin settings area under WPFantasy Settings.
Starting A New League
After importing players and clubs via CSV, you can start creating a new league.
In your WordPress admin area, navigate to the Leagues section, which includes two submenus:
- All Leagues – View all leagues created by you and other users.
- Add New – Manually create a new league by entering the league title, selecting the budget, and setting up fixtures.
When setting up fixtures, you can choose teams from the database. For each fixture, specify a start date. Note that once the first fixture of the league begins, users will no longer be able to select their teams. Until the first fixture starts, any signed-in user can choose their team to participate in the league.
Customisations
The WP Fantasy plugin allows signed-in users to create fantasy leagues where they can compete against each other. Users can add players and clubs to the database and then set up leagues using these teams.
As a league creator, you can customize various settings, such as the league budget and the points system for player performance. Points can be awarded based on criteria such as goals, assists, goals conceded, penalties scored, and minutes played.
After each fixture, the league creator needs to input player statistics. The plugin will then automatically calculate and sort the results to determine the top-performing teams based on the accumulated points.