diff --git a/partials/_latest-updates-compact.php b/partials/_latest-updates-compact.php
index 74e66d8a..437535d3 100644
--- a/partials/_latest-updates-compact.php
+++ b/partials/_latest-updates-compact.php
@@ -146,11 +146,13 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
$search_list = array_reverse( $story['chapter_ids'] );
foreach ( $search_list as $chapter_id ) {
+ $chapter_post = get_post( $chapter_id );
+
if ( get_post_meta( $chapter_id, 'fictioneer_chapter_hidden', true ) ) {
continue;
}
- $chapter_list[] = $chapter_id;
+ $chapter_list[] = $chapter_post;
break; // Only one needed
}
@@ -203,33 +205,40 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
-
+
ID, 'fictioneer_chapter_list_title', true );
$list_title = trim( wp_strip_all_tags( $list_title ) );
if ( empty( $list_title ) ) {
- $chapter_title = fictioneer_get_safe_title( $chapter_id );
+ $chapter_title = fictioneer_get_safe_title( $chapter->ID );
} else {
$chapter_title = $list_title;
}
+ // Extra classes
+ $list_item_classes = [];
+
+ if ( ! empty( $chapter->post_password ) ) {
+ $list_item_classes[] = '_password';
+ }
+
// Chapter excerpt
- $chapter_excerpt = fictioneer_get_forced_excerpt( $chapter_id, 768 );
+ $chapter_excerpt = fictioneer_get_forced_excerpt( $chapter->ID, 768 );
?>
- -
+
-
ID ) );
echo ' • ';
- echo get_the_date( FICTIONEER_LATEST_UPDATES_LI_DATE, $chapter_id )
+ echo get_the_date( FICTIONEER_LATEST_UPDATES_LI_DATE, $chapter->ID )
?>
diff --git a/partials/_latest-updates.php b/partials/_latest-updates.php
index 742c2fc6..a43d48c2 100644
--- a/partials/_latest-updates.php
+++ b/partials/_latest-updates.php
@@ -146,11 +146,13 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
$search_list = array_reverse( $story['chapter_ids'] );
foreach ( $search_list as $chapter_id ) {
+ $chapter_post = get_post( $chapter_id );
+
if ( get_post_meta( $chapter_id, 'fictioneer_chapter_hidden', true ) ) {
continue;
}
- $chapter_list[] = $chapter_id;
+ $chapter_list[] = $chapter_post;
if ( count( $chapter_list ) > 1 ) {
break; // Max two
@@ -204,27 +206,37 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );