diff --git a/templates/event-list.php b/templates/event-list.php index 536f2758..78164642 100644 --- a/templates/event-list.php +++ b/templates/event-list.php @@ -152,7 +152,7 @@ $identifier = uniqid( 'eventlist_' ); switch ( $title_format ) { case 'homeaway': if ( sp_column_active( $usecolumns, 'event' ) ) { - echo '' . esc_attr__( 'Home', 'sportspress' ) . ''; + echo '' . esc_attr__( 'Away', 'sportspress' ) . ''; } if ( 'combined' == $time_format && sp_column_active( $usecolumns, 'time' ) ) { @@ -163,7 +163,7 @@ $identifier = uniqid( 'eventlist_' ); } if ( sp_column_active( $usecolumns, 'event' ) ) { - echo '' . esc_attr__( 'Away', 'sportspress' ) . ''; + echo '' . esc_attr__( 'Home', 'sportspress' ) . ''; } if ( in_array( $time_format, array( 'separate', 'time' ) ) && sp_column_active( $usecolumns, 'time' ) ) { @@ -322,9 +322,13 @@ $identifier = uniqid( 'eventlist_' ); switch ( $title_format ) { case 'homeaway': + $away_team = null; + $home_team = null; + if ( sp_column_active( $usecolumns, 'event' ) ) { - $team = array_shift( $teams_array ); - echo '' . wp_kses_post( $team ) . ''; + $away_team = array_shift( $teams_array ); + $home_team = array_shift( $teams_array ); + echo '' . wp_kses_post( $away_team ) . ''; } if ( 'combined' == $time_format && sp_column_active( $usecolumns, 'time' ) ) { @@ -358,8 +362,7 @@ $identifier = uniqid( 'eventlist_' ); } if ( sp_column_active( $usecolumns, 'event' ) ) { - $team = array_shift( $teams_array ); - echo '' . wp_kses_post( $team ) . ''; + echo '' . wp_kses_post( $home_team ) . ''; } if ( in_array( $time_format, array( 'separate', 'time' ) ) && sp_column_active( $usecolumns, 'time' ) ) {