Only show specific seasons in team-events.php in template

[ad_1]

Hi!

I created my own system to make BO3 matches. But the problem I have now is that I only want to show the BO3 games on the team pages and not the matches in the BO3. Now all the matches are showing. So I would like to change team-events.php so it only shows the seasons I specify. In this way I can remove all the “Single matches” in BO3 from the team page.

This is the code i have right now.

echo '<h4 class="sp-table-caption">Resultat</h4>';
if ( 'calendar' === $format ) {
	sp_get_template( 'event-calendar.php', array( 'team' => $id ) );
} elseif ( 'list' === $format ) {
	$args = array(
		'team'         => $id,
		'league'       => apply_filters( 'sp_team_events_league', 0 ),
		'season'       => apply_filters( 'sp_team_events_season', 0 ),
		'status'       => 'publish',
		'title_format' => 'homeaway',
		'time_format'  => 'separate',
		'columns'      => array( 'event', 'results', 'venue' ),
		'order'        => 'DESC',
);
$args = apply_filters( 'sp_team_events_list_args', $args );
	sp_get_template( 'event-list.php', $args );
} else {
	sp_get_template( 'event-fixtures-results.php', array( 'team' => $id ) );
}

Then the problem becomes that it is unable to read that there are several seasons. So, for example, if I change this.

'season'       => array( 127, 129),

It will not work.

I’ve tried a couple of different solutions. The problem I always run into is that it can’t really read more than 1 season.

My question is therefore if there is a block somewhere in the code that makes it unable to read more the one season? Or I’m doing something wrong?

I know you won’t help with the code, but since you know it best, it would make it easier if I could get an answer to whether it is even possible to solve and where I should look for the solution, as I am at a complete standstill after trying a lot of different things and spent 2 months on this.

If it is the case that I am not allowed to ask questions like this, you can absolutely remove this question.

Thanks!

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer