Forum
Perch Blog Custom Multi Filter
Hi there,
Does Perch Blog work with multiple filters like perch_content_custom?
I'm trying this, it's not returning a result when using both filters, but using just one of them works.
<?php
$year = perch_get('year');
$dateFrom = $year.'-01-01';
$dateTo = $year.'-12-31';
perch_blog_custom(array(
'filter'=> array (
array (
'filter' => 'postDateTime',
'match' => 'eqbetween',
'value' => $dateFrom.','.$dateTo
),
array (
'filter' => 'postSlug',
'match' => 'eq',
'value' => perch_get('s')
)
)
));
?>
If you turn on debug, do you get any errors output?
I get this:
and this
If you run the query directly, do you get any results?
No, no results.
It's weird, there should be a post that equals that slug and in 2015.
If I run the slug filter on it's own it returns the correct post.
If i run the 2015 one it obviously returns all posts from 2015 including the one that i need.
To confirm, you're using the latest version of Blog (at least as of yesterday), correct?
That's correct.
4.5.4
Can you try with today's build just in case?
Absolutely, I'm excited for Blocks anyway.
I'll update now
Updated, no change.
Ran the query too
Ok, in which case I have no quick answer. I'll have to schedule some time to investigate.
Ok, thanks for your help
Unfortunately, this still seems to be an issue.