From 3d1f5018495698bca3b13f7b228139c18a8749c1 Mon Sep 17 00:00:00 2001 From: ThemeBoy Date: Tue, 10 Dec 2013 22:59:33 +1100 Subject: [PATCH] Display rank and team logo in league table --- sportspress-functions.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sportspress-functions.php b/sportspress-functions.php index 79aa3292..22778f84 100644 --- a/sportspress-functions.php +++ b/sportspress-functions.php @@ -1208,6 +1208,8 @@ if ( !function_exists( 'sp_get_table_html' ) ) { $output .= '' . '' . '' . ''; + $i = 1; + foreach( $data as $team_id => $row ): $output .= ''; @@ -1216,6 +1218,11 @@ if ( !function_exists( 'sp_get_table_html' ) ) { $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; @@ -1227,6 +1234,8 @@ if ( !function_exists( 'sp_get_table_html' ) ) { $output .= ''; + $i++; + endforeach; $output .= '' . '';