Category Template – Posts from Current Category with Custom Taxonomy

Posted in: Newspaper
Post count: 108

Hi Guys, on my global category archive template as well as the main post loop I also want to show a flex block 1 with posts from the same/current category that also have a custom taxonomy for ‘Location’.

If I drop a flex block 1 into the page, set the Filter to ‘Current Category’ and then in the ‘Multiple terms filter’ add the ID of the taxonomy for the ‘Asia’ Location which is ’11’, the flex block 1 fetches anything with this custom taxonomy, not just posts from the current category.

Is there any way to achieve this with the flex block 1 filters?
Thanks
Matt

Post count: 27744

Hello,

Do you add the block in a page or category template? This filter’s current category works only in the category template. Please provide some screenshots.

Thank you!

Post count: 108

Hi Anamaria, we’re adding the Flex Block 1 onto a Category Template.

The filter is set to ‘Current Category’ and the ID of the Custom Taxonomy ’11’ is added in the ‘Multiple terms filter’ field. Please see the attached screengrab for confirmation.

tagDiv Composer Screengrab

When we save those settings and return to the live site, no matter what category archive we view, the four articles are always from the ’11’ taxonomy and all categories, not just the ‘Current Category’.

Should this work or are the two filters not && ?
Thanks
Matt

Post count: 27744

Hello,

Unfortunately, you can not use two filters because there is an “OR” relation.

Thank you!

Post count: 108

Hi Anamaria, thanks for the confirmation.

The ability to have these as and/or fields/filters would be really useful. We use tags for ‘Featured’ content too, so being able to show content from the current category that also has a specific tag would be really useful.

Thnaks
Matt

Post count: 27744

Hello,

You can use custom filed to filter the block -> https://i.imgur.com/qcyeXGd.png

Thank you!

Post count: 108

Hi Anamaria, is that not for ACF Fields, not Custom Taxonomies?

Matt

Post count: 27744

Hello,

For custom fields, you can use the filer together with the category filter, but is there a category template or a taxonomy template?

Thank you!

Post count: 15

Hello Anamaria
How can i use Big grid flex or flex block to display custom content or link to a custom page.
Filter work only for posts
thank you

Post count: 27744

Hello,

Please provide more details about what custom content you are referring to. Also, if you want to show a page in the block you can set the page id or post type -> https://i.imgur.com/Yu0OVaH.png

Thank you!

Post count: 15

Thank you 🙂

Post count: 9

Hi, I am also facing similar issue, if you have solved, can you help me how to do it? Implementing And logic.

Like “Current Taxonomy (And – Logic) Category Filter ID” ?

This the Case I created: https://forum.tagdiv.com/topic/flex-block-filtering-issue-current-taxonomy-term-and-specific-category-id/

Post count: 35449
Viewing 13 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic.