Display role taxonomy name in staff title

This commit is contained in:
Brian Miyaji
2014-08-24 16:45:32 +10:00
parent 6db2ef67ba
commit 16fba6cfc4

View File

@@ -114,9 +114,10 @@ function sportspress_the_title( $title, $id = null ) {
$title = '<strong>' . $number . '</strong> ' . $title; $title = '<strong>' . $number . '</strong> ' . $title;
endif; endif;
elseif ( is_singular( 'sp_staff' ) ): elseif ( is_singular( 'sp_staff' ) ):
$role = get_post_meta( $id, 'sp_role', true ); $staff = new SP_Staff( $id );
if ( $role != null ): $role = $staff->role();
$title = '<strong>' . $role . '</strong> ' . $title; if ( $role ):
$title = '<strong>' . $role->name . '</strong> ' . $title;
endif; endif;
elseif ( is_singular( 'sp_event' ) && get_option( 'sportspress_event_show_logos', 'yes' ) == 'yes' ): elseif ( is_singular( 'sp_event' ) && get_option( 'sportspress_event_show_logos', 'yes' ) == 'yes' ):
$teams = get_post_meta( $id, 'sp_team' ); $teams = get_post_meta( $id, 'sp_team' );