From 2f6c8a6b8d3f8e8febf7c47e0ad5608bcd8cde4c Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 26 Jun 2014 15:49:06 +1000 Subject: [PATCH] Remove links to league and season archives --- includes/sp-template-hooks.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/includes/sp-template-hooks.php b/includes/sp-template-hooks.php index 4b9af7b2..404b9f36 100644 --- a/includes/sp-template-hooks.php +++ b/includes/sp-template-hooks.php @@ -239,6 +239,15 @@ function sportspress_team_permalink( $permalink, $post ) { } add_filter( 'post_type_link', 'sportspress_team_permalink', 10, 2 ); +function sportspress_no_terms_links( $term_list, $taxonomy ) { + + if ( in_array( $taxonomy, array( 'sp_league', 'sp_season' ) ) ) + return wp_filter_nohtml_kses( $term_list ); + + return $term_list; +} +add_filter( 'the_terms', 'sportspress_no_terms_links', 10, 2 ); + function sportspress_pre_get_posts( $query ) { if ( is_admin() ):