diff --git a/actions.php b/actions.php index 0ca51ef8..6c029c05 100644 --- a/actions.php +++ b/actions.php @@ -101,8 +101,9 @@ function sp_save_post( $post_id ) { foreach ( $sportspress as $key => $value ): delete_post_meta( $post_id, $key ); if ( is_array( $value ) ): - foreach ( $value as $single_value ): - add_post_meta( $post_id, $key, $single_value, false ); + $values = new RecursiveIteratorIterator( new RecursiveArrayIterator( $value ) ); + foreach ( $values as $value ): + add_post_meta( $post_id, $key, $value, false ); endforeach; else: update_post_meta( $post_id, $key, $value ); diff --git a/event.php b/event.php index ddc6349c..078c81b2 100644 --- a/event.php +++ b/event.php @@ -36,6 +36,7 @@ function sp_event_team_meta( $post ) { $limit = get_option( 'sp_event_team_count' ); $teams = array_pad( array_slice( (array)get_post_meta( $post->ID, 'sp_team', false ), 0, $limit ), $limit, 0); $scores = array_pad( array_slice( (array)get_post_meta( $post->ID, 'sp_score', false ), 0, $limit ), $limit, 0); + $players = (array)get_post_meta( $post->ID, 'sp_player', false ); for ( $i = 0; $i < $limit; $i++ ): ?>