From 68263c3ae5b739540c7744fcab807a300609cb73 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Wed, 9 Jul 2014 16:56:06 +1000 Subject: [PATCH] Unsuppress filters for WPML compatibility --- includes/sp-template-hooks.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/sp-template-hooks.php b/includes/sp-template-hooks.php index f155db9d..a3ae77e3 100644 --- a/includes/sp-template-hooks.php +++ b/includes/sp-template-hooks.php @@ -243,12 +243,16 @@ function sportspress_no_terms_links( $term_list, $taxonomy ) { add_filter( 'the_terms', 'sportspress_no_terms_links', 10, 2 ); function sportspress_pre_get_posts( $query ) { + $post_type = $query->query['post_type']; + + if ( is_sp_post_type( $post_type ) ): + $query->set( 'suppress_filters', 0 ); + endif; if ( is_admin() ): if ( isset( $query->query[ 'orderby' ] ) || isset( $query->query[ 'order' ] ) ): return $query; endif; - $post_type = $query->query['post_type']; if ( is_sp_config_type( $post_type ) ): $query->set( 'orderby', 'menu_order' );