Chapter card rating defaults to story
This commit is contained in:
parent
2cb8c114c5
commit
4d059dabda
@ -30,6 +30,10 @@ $text_icon = get_post_meta( $post_id, 'fictioneer_chapter_text_icon', true );
|
||||
$excerpt = fictioneer_get_forced_excerpt( $post, 512, true );
|
||||
$card_classes = [];
|
||||
|
||||
if ( ! $chapter_rating && $story_id ) {
|
||||
$chapter_rating = get_post_meta( $story_id, 'fictioneer_story_rating', true );
|
||||
}
|
||||
|
||||
// Taxonomies
|
||||
$tags = false;
|
||||
$fandoms = false;
|
||||
|
@ -174,6 +174,10 @@ if ( $splide ) {
|
||||
$chapter_rating = get_post_meta( $post_id, 'fictioneer_chapter_rating', true );
|
||||
$words = fictioneer_get_word_count( $post_id );
|
||||
|
||||
if ( ! $chapter_rating && $story_id ) {
|
||||
$chapter_rating = get_post_meta( $story_id, 'fictioneer_story_rating', true );
|
||||
}
|
||||
|
||||
// Thumbnail
|
||||
$thumbnail = null;
|
||||
|
||||
|
@ -169,6 +169,10 @@ if ( $splide ) {
|
||||
$grid_or_vertical = $args['vertical'] ? '_vertical' : '_grid';
|
||||
$card_classes = [];
|
||||
|
||||
if ( ! $chapter_rating && $story_id ) {
|
||||
$chapter_rating = get_post_meta( $story_id, 'fictioneer_story_rating', true );
|
||||
}
|
||||
|
||||
// Extra card classes
|
||||
if ( ! empty( $post->post_password ) ) {
|
||||
$card_classes[] = '_password';
|
||||
|
Loading…
x
Reference in New Issue
Block a user