Forum
Perch blog multiple categories
Hi, I've created two category sets for blog posts: type (blog category by default) and language (a new set).
I want my client to have to diferent selects for both sets, for then display a blog custom post list filtering multiple categories, by a type and language. I am trying with:
perch_blog_custom(array(
'filter' => 'fecha-inicio',
'value' => $eachYear,
'template' => 'proyectos-list.html',
'sort' => 'postDateTime',
'sort-order' => 'DESC',
'category' => $categoriaProyecto,
'language' => array($lang),
));
How can I do this? Thanks!
The
category
option needs to be an array of the categories you wish to filter by. There is nolanguage
option.Ok, but 'language' is my category id and category set slug.
Then, according to https://docs.grabaperch.com/docs/categories/filtering/ I should use it as:
and
but it does not work...
how do I display an array of categories with variables?
should be
Drew, that way prints posts for any of those categories, but what I need is to show post with both categories at the same time... Is there any way for doing that ( & operator?)
Thanks!
Use the
category-match
optionor
Thanks Drew!