Theme Integration Guide

SportsPress will integrate seamlessly with most WordPress themes. Instead of generating a custom page template for each post type, SportsPress adds elements to the post's  the_content filter, using 3 different actions to control the order. Other areas of the plugin can easily be hooked into using predefined actions and filters.

Hooks, Actions, and Filters

WordPress hooks are placed in areas of the SportsPress code to allow you to 'hook into' various functions. Please refer to the following links for an extensive list of the actions and filters provided in SportsPress Pro:

Custom Page Templates

SportsPress will automatically use the standard page template within your theme. By creating your own page templates, you'll be able to change the way SportsPress data is presented. There are 2 methods: create a generic SportsPress page template to handle various elements from within one file, or create a separate page template per post type to display each one using a unique layout.

To create a generic template, duplicate your theme's page.php file and name it  sportspress.php. This file should be located in:

wp-content/themes/YOURTHEME/sportspress.php

To take it a step further and define separate templates per post type, create a folder called  sportspress inside your theme's root directory. Then, create copies of the original page.php for each of the following files:

  • single-event.php (Event)
  • single-calendar.php (Calendar)
  • single-team.php (Team)
  • single-table.php (League Table)
  • single-player.php (Player)
  • single-list.php (Player List)
  • single-staff.php (Staff)
  • single-directory.php (Staff Directory)
  • single-sponsor.php (Sponsor)

You can also create create a copy of  archive.php and rename it taxonomy-venue.php to design a custom venue archive page.

Each of these files should be inside the  sportspress folder inside your theme.

Declare Support

Once you're happy that your theme fully supports SportsPress, you should declare it in the code to hide the "Your theme does not declare SportsPress support" message. To do so you should add the following to your theme support function:

 add_theme_support( 'sportspress' );

Become a Theme Partner

Are you selling a sports theme on your site or a marketplace? Integrate with SportsPress and become a partner to earn 30% commission per successful referral!

For more information on ThemeBoy's Theme Partnership Program and to apply, visit https://www.themeboy.com/partners/

If all else fails…

If you cannot work out the above methods, and don’t have access to a developer, we strongly recommend looking at ThemeBoy's  SportsPress Themes which work out of the box as a hassle-free solution.

Still need help? Submit a Support Ticket Submit a Support Ticket