From b57bb50c59449bf313455e4f4d51ffbfcf87fa12 Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Tue, 13 Jun 2023 11:22:39 +0200 Subject: [PATCH] Main RSS Feed does not cover all posts Haha, this has been broken for forever... hahaha... ha --- rss-rss-main.php | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/rss-rss-main.php b/rss-rss-main.php index 032c176a..302f1a63 100644 --- a/rss-rss-main.php +++ b/rss-rss-main.php @@ -1,6 +1,6 @@ 'publish', 'orderby' => 'date', 'order' => 'DESC', - 'meta_key' => 'fictioneer_chapter_hidden', - 'meta_value' => '0', 'posts_per_page' => get_option( 'posts_per_rss' ), + 'meta_query' => array( + 'relation' => 'AND', + array( + 'relation' => 'OR', + array( + 'key' => 'fictioneer_chapter_hidden', + 'value' => '0' + ), + array( + 'key' => 'fictioneer_chapter_hidden', + 'compare' => 'NOT EXISTS' + ) + ), + array( + 'relation' => 'OR', + array( + 'key' => 'fictioneer_story_hidden', + 'value' => '0' + ), + array( + 'key' => 'fictioneer_story_hidden', + 'compare' => 'NOT EXISTS' + ) + ) + ), 'no_found_rows' => true ) );