diff --git a/partials/_latest-updates-compact.php b/partials/_latest-updates-compact.php index aa8cca55..cf33ebe9 100644 --- a/partials/_latest-updates-compact.php +++ b/partials/_latest-updates-compact.php @@ -212,6 +212,10 @@ if ( $splide ) { foreach ( $search_list as $chapter_id ) { $chapter_post = get_post( $chapter_id ); + if ( ! $chapter_post ) { + continue; + } + if ( get_post_meta( $chapter_id, 'fictioneer_chapter_hidden', true ) ) { continue; } diff --git a/partials/_latest-updates-list.php b/partials/_latest-updates-list.php index 7b4406d3..5b1689c0 100644 --- a/partials/_latest-updates-list.php +++ b/partials/_latest-updates-list.php @@ -254,6 +254,10 @@ if ( $splide ) { foreach ( $search_list as $chapter_id ) { $chapter_post = get_post( $chapter_id ); + if ( ! $chapter_post ) { + continue; + } + if ( ! $chapter_post || get_post_meta( $chapter_id, 'fictioneer_chapter_hidden', true ) ) { continue; } diff --git a/partials/_latest-updates.php b/partials/_latest-updates.php index bf44478f..a90c263f 100644 --- a/partials/_latest-updates.php +++ b/partials/_latest-updates.php @@ -245,6 +245,10 @@ if ( $splide ) { foreach ( $search_list as $chapter_id ) { $chapter_post = get_post( $chapter_id ); + if ( ! $chapter_post ) { + continue; + } + if ( get_post_meta( $chapter_id, 'fictioneer_chapter_hidden', true ) ) { continue; }