diff --git a/includes/sp-template-hooks.php b/includes/sp-template-hooks.php index e7657450..90a43e6b 100644 --- a/includes/sp-template-hooks.php +++ b/includes/sp-template-hooks.php @@ -114,9 +114,10 @@ function sportspress_the_title( $title, $id = null ) { $title = '' . $number . ' ' . $title; endif; elseif ( is_singular( 'sp_staff' ) ): - $role = get_post_meta( $id, 'sp_role', true ); - if ( $role != null ): - $title = '' . $role . ' ' . $title; + $staff = new SP_Staff( $id ); + $role = $staff->role(); + if ( $role ): + $title = '' . $role->name . ' ' . $title; endif; elseif ( is_singular( 'sp_event' ) && get_option( 'sportspress_event_show_logos', 'yes' ) == 'yes' ): $teams = get_post_meta( $id, 'sp_team' );