Made chapter meta queries more resilient
This commit is contained in:
parent
b34bb3b8ef
commit
97fb5cae04
13
chapters.php
13
chapters.php
@ -34,8 +34,17 @@ $query_args = array (
|
||||
'order' => $order,
|
||||
'paged' => $page,
|
||||
'posts_per_page' => get_option( 'posts_per_page', 8 ),
|
||||
'meta_key' => 'fictioneer_chapter_hidden',
|
||||
'meta_value' => '0'
|
||||
'meta_query' => array(
|
||||
'relation' => 'OR',
|
||||
array(
|
||||
'key' => 'fictioneer_chapter_hidden',
|
||||
'value' => '0'
|
||||
),
|
||||
array(
|
||||
'key' => 'fictioneer_chapter_hidden',
|
||||
'compare' => 'NOT EXISTS'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Append date query (if any)
|
||||
|
@ -265,10 +265,16 @@ if ( ! function_exists( 'fictioneer_query_followed_chapters' ) ) {
|
||||
'value' => $story_ids,
|
||||
'compare' => 'IN',
|
||||
),
|
||||
array(
|
||||
'relation' => 'OR',
|
||||
array(
|
||||
'key' => 'fictioneer_chapter_hidden',
|
||||
'value' => 0,
|
||||
'compare' => '=',
|
||||
'value' => '0'
|
||||
),
|
||||
array(
|
||||
'key' => 'fictioneer_chapter_hidden',
|
||||
'compare' => 'NOT EXISTS'
|
||||
)
|
||||
)
|
||||
),
|
||||
'numberposts' => $count,
|
||||
|
Loading…
x
Reference in New Issue
Block a user