diff --git a/sportspress-functions.php b/sportspress-functions.php
index 7a4dcad0..174d2251 100644
--- a/sportspress-functions.php
+++ b/sportspress-functions.php
@@ -1430,22 +1430,15 @@ if ( !function_exists( 'sp_get_table_html' ) ) {
$output .= '
';
- foreach( $row as $key => $value ):
- $output .= '| ';
- if ( $key == 'name' ):
- $permalink = get_post_permalink( $team_id );
- $thumbnail = get_the_post_thumbnail( $team_id, 'sp_icon' );
- $output .= $i . ' ';
- if ( $thumbnail ):
- $output .= '' . $thumbnail . ' ';
- endif;
- $output .= '';
- endif;
- $output .= $value;
- if ( $key == 'name' ):
- $output .= '';
- endif;
- $output .= ' | ';
+ // Thumbnail and name as link
+ $permalink = get_post_permalink( $team_id );
+ $thumbnail = get_the_post_thumbnail( $team_id, 'sp_icon' );
+ $output .= '' . $i . '. ' . ( $thumbnail ? $thumbnail . ' ' : '' ) . '' . sp_array_value( $row, 'name', ' ' ) . ' | ';
+
+ foreach( $labels as $key => $value ):
+ if ( $key == 'name' )
+ continue;
+ $output .= '' . sp_array_value( $row, $key, '—' ) . ' | ';
endforeach;
$output .= '
';
@@ -1484,17 +1477,15 @@ if ( !function_exists( 'sp_get_list_html' ) ) {
$output .= '';
- foreach( $row as $key => $value ):
- $output .= '| ';
- if ( $key == 'name' ):
- $permalink = get_post_permalink( $player_id );
- $output .= '';
- endif;
- $output .= $value;
- if ( $key == 'name' ):
- $output .= '';
- endif;
- $output .= ' | ';
+ // Name as link
+ $permalink = get_post_permalink( $player_id );
+ $number = get_post_meta( $player_id, 'sp_number', true );
+ $output .= '' . ( $number ? $number . '. ' : '' ) . '' . sp_array_value( $row, 'name', ' ' ) . ' | ';
+
+ foreach( $labels as $key => $value ):
+ if ( $key == 'name' )
+ continue;
+ $output .= '' . sp_array_value( $row, $key, '—' ) . ' | ';
endforeach;
$output .= '
';