@bartvanbelle @rochesterj
Hi Bart, this worked for me :
Backup /wp-content/plugins/sportspress/feeds/ical.php
Open /wp-content/plugins/sportspress/feeds/ical.php
On line 131 :
1. Add the function to get the sp_league field:
$league = get_the_terms( $event->ID, ‘sp_league’ );
2. Change the $summary to start with the league’s name:
$summary = $league[0]->name;
3. Modify the ‘if’ which decides if post_title or team names will be printed:
$summary .= ‘ – ‘ . implode( ‘ ‘, $results );
or
$summary .= ‘ – ‘ . $event->post_title;
Everything should look like this :
$league = get_the_terms( $event->ID, 'sp_league' );
$summary = $league[0]->name;
if ( sizeof( $results ) ) {
$summary .= ' - ' . implode( ' ', $results );
} else {
$summary .= ' - ' . $event->post_title;
}
You can download the file from here :
https://anonymousfiles.io/iNK84RrJ/
Remember to keep a local copy to re-upload after you update the SportsPress plugin.
-
This reply was modified 5 years, 6 months ago by
corrinarusso.