Check if not admin when filtering title

This commit is contained in:
Brian Miyaji
2014-04-29 11:08:32 +10:00
parent a5ea708b60
commit f44140d9ba

View File

@@ -87,7 +87,7 @@ add_action( 'sportspress_single_staff_content', 'sportspress_output_staff_detail
add_action( 'loop_start', 'sportspress_output_venue_map' ); add_action( 'loop_start', 'sportspress_output_venue_map' );
function sportspress_the_title( $title, $id ) { function sportspress_the_title( $title, $id ) {
if ( ! current_theme_supports( 'sportspress' ) && in_the_loop() && $id == get_the_ID() ): if ( ! is_admin() && ! current_theme_supports( 'sportspress' ) && in_the_loop() && $id == get_the_ID() ):
if ( is_singular( 'sp_player' ) ): if ( is_singular( 'sp_player' ) ):
$number = get_post_meta( $id, 'sp_number', true ); $number = get_post_meta( $id, 'sp_number', true );
if ( $number != null ): if ( $number != null ):