Fix list template date queries

This commit is contained in:
Tetrakern 2023-06-11 02:17:46 +02:00
parent c35ea2a5ad
commit 0ed01cb2a0
4 changed files with 24 additions and 0 deletions

View File

@ -41,9 +41,15 @@ $query_args = array (
// Date query?
if ( is_numeric( $ago ) && $ago > 0 ) {
$query_args['date_query'] = array(
'relation' => 'OR',
array(
'after'=> "{$ago} days ago",
'inclusive' => true,
),
array(
'column' => 'post_modified',
'after'=> "{$ago} days ago",
'inclusive' => true,
)
);
} elseif ( ! empty( $ago ) ) {

View File

@ -39,9 +39,15 @@ $query_args = array (
// Date query?
if ( is_numeric( $ago ) && $ago > 0 ) {
$query_args['date_query'] = array(
'relation' => 'OR',
array(
'after'=> "{$ago} days ago",
'inclusive' => true,
),
array(
'column' => 'post_modified',
'after'=> "{$ago} days ago",
'inclusive' => true,
)
);
} elseif ( ! empty( $ago ) ) {

View File

@ -39,9 +39,15 @@ $query_args = array (
// Date query?
if ( is_numeric( $ago ) && $ago > 0 ) {
$query_args['date_query'] = array(
'relation' => 'OR',
array(
'after'=> "{$ago} days ago",
'inclusive' => true,
),
array(
'column' => 'post_modified',
'after'=> "{$ago} days ago",
'inclusive' => true,
)
);
} elseif ( ! empty( $ago ) ) {

View File

@ -51,9 +51,15 @@ $query_args = array (
// Date query?
if ( is_numeric( $ago ) && $ago > 0 ) {
$query_args['date_query'] = array(
'relation' => 'OR',
array(
'after'=> "{$ago} days ago",
'inclusive' => true,
),
array(
'column' => 'post_modified',
'after'=> "{$ago} days ago",
'inclusive' => true,
)
);
} elseif ( ! empty( $ago ) ) {