Hiding a div when appearing on Post in the same category

I’m working on this post template:

https://news.seoul.dulwich.org/friends-of-dulwich-23-june-2023/

And at the bottom, there are 5 sections that lead to the other categories on the website.

The issue is, they only want 4 sections to appear - and NOT the category of the current post. I tried making them not display using a conditional, but it still shows up:

What else could I do? Right now each one of the DIVs has a query loop for the 1 most recent article of that category. It works perfect - except that I need the one for the current category to not appear on that Post!

How do I make the “Whole School” Div not display when the category is “Whole School”?

This is a repeat of this question I asked last year:

So I managed to make the DIVs not appear when i set the {post_terms_category} to “does not include” one word of the category -

But then it doesn’t appear on EVERY page. So there MUST be a setting that would allow me to hide it based on the category of the Post that it’s on, but I can’t seem to figure it out! I tried setting the {terms_slug} to the term slug, I tried setting the {term_id} to the proper term ID and I’ve tried the {term_name} to the term name.

Hey Steve,

I’m having a hard time to exactly understand what you’re trying to achieve as you’re mixing up posts and terms.

So you’re creating a post template that should apply to ALL of your posts, right? At the bottom of this template you want to link to other categories? Cause at the moment you’re linking to other posts, not categories.

Could you maybe record a small screencast and demonstrate and explain your setup and what exactly you’re trying to achieve? Then I’m happy to help. :slight_smile:

Best,

André

1 Like

! Here’s a video that may explain better what I’m trying to achieve:

At least I hope it does. Let me know if I’ve still not explained it properly.

Thank you @aslotta

Is every post in the site only assigned to a single category?

1 Like

Yes, every site will never have more than one category.

Hi @intcultcom,

If the is not inside another nested query loop, it should work.
Kindly provide a temp admin access to help@bricksbuilder.io
I would help you to check.

Regards,
Jenn

1 Like