Add custom order to staff jobs

This commit is contained in:
Brian Miyaji
2017-11-18 19:29:42 +11:00
parent 77f46b23b0
commit 5f150971f1
4 changed files with 42 additions and 9 deletions

View File

@@ -44,11 +44,9 @@ function sportspress_the_title( $title, $id = null ) {
endif;
elseif ( is_singular( 'sp_staff' ) ):
$staff = new SP_Staff( $id );
$roles = $staff->roles();
if ( ! empty( $roles ) ):
$roles = wp_list_pluck( $roles, 'name' );
$title = '<strong class="sp-staff-role">' . implode( '<span class="sp-staff-role-delimiter">/</span>', $roles ) . '</strong> ' . $title;
endif;
$role = $staff->role();
if ( $role )
$title = '<strong class="sp-staff-role">' . $role->name . '</strong> ' . $title;
endif;
endif;