Fix chapter links to 404 pages
This commit is contained in:
parent
6de12b66ae
commit
b19473f0c5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -544,6 +544,9 @@ function fictioneer_story_chapters( $args ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Link
|
||||
$link = $post->post_status === 'publish' ? get_permalink() : '';
|
||||
|
||||
// Data
|
||||
$group = get_post_meta( $chapter_id, 'fictioneer_chapter_group', true );
|
||||
$group = empty( $group ) ? fcntr( 'unassigned_group' ) : $group;
|
||||
@ -560,7 +563,7 @@ function fictioneer_story_chapters( $args ) {
|
||||
$chapter_groups[ $group_key ]['data'][] = array(
|
||||
'id' => $chapter_id,
|
||||
'status' => $post->post_status,
|
||||
'link' => get_permalink(),
|
||||
'link' => $link,
|
||||
'timestamp' => get_the_time( 'c' ),
|
||||
'password' => ! empty( $post->post_password ),
|
||||
'list_date' => get_the_date( '', $post ),
|
||||
@ -657,7 +660,7 @@ function fictioneer_story_chapters( $args ) {
|
||||
<?php endif; ?>
|
||||
|
||||
<a
|
||||
href="<?php echo $chapter['link']; ?>"
|
||||
<?php echo $chapter['link'] ? "href='{$chapter['link']}'" : ''; ?>
|
||||
class="chapter-group__list-item-link truncate _1-1 <?php echo $chapter['password'] ? '_password' : ''; ?>"
|
||||
><?php
|
||||
|
||||
|
@ -695,6 +695,11 @@ html:not(.logged-in) body:not(.logged-in) {
|
||||
&:hover {
|
||||
color: var(--chapter-list-link-color-hover, var(--heading-link-color-hover));
|
||||
}
|
||||
|
||||
&:not([href]) {
|
||||
cursor: default;
|
||||
color: var(--fg-700);
|
||||
}
|
||||
}
|
||||
|
||||
&-subrow {
|
||||
|
Loading…
x
Reference in New Issue
Block a user