diff --git a/modules/sportspress-lazy-loading.php b/modules/sportspress-lazy-loading.php index 38b9d711..fe6fca07 100644 --- a/modules/sportspress-lazy-loading.php +++ b/modules/sportspress-lazy-loading.php @@ -173,7 +173,16 @@ class SportsPress_Lazy_Loading { $posts = sp_get_posts( $post_type, $args ); $post_ids = wp_list_pluck( $posts, 'ID' ); $diff = array_diff( $post_ids, $selected ); + $borrowed = array_diff( $selected, $post_ids ); $selected = array_flip( $selected ); + + if ( sizeof( $borrowed ) ) { + $args = array( 'post__in' => $borrowed ); + $borrowed_posts = sp_get_posts( $post_type, $args ); + if ( is_array( $borrowed_posts ) ) { + $posts += $borrowed_posts; + } + } ?>