Template: multiple conditions AND or OR?

I’m a little confused regarding Template conditions: I have a CPT “Person” which has a taxonomy ‘staff categories’ attached to it. One of the terms in that taxonomy is “scientist”.

I now want to make a template specific for scientists, so I assigned these conditions:

image

(the fisrt post type conditions is of course post type = Person)

When I check a “person” who doesn’t have the “scientist” term attached to them, then the same template is still being used.

That would make me think that perhaps it’s an OR between conditions, but I have read in another post here that there’s an AND between conditions. Can someone shed some light on this?

And in case it’s an OR, how do I make a template specific for scientists in my case?

Much, much appreciated,
Geert

I think template conditions work with OR.
Also your way would not work even if it would be AND. Terms condition means it will be displayed on term archive pages. So this template will be displayed on list of Person pages in term Scientist.

I feel template conditions are a bit limited, in the past I was struggling with them also. You could do it with Element conditions. So you would have all versions in one template and display it based on what terms are assigned to current page. It’s not ideal, but it would work with some simple php function.

1 Like

Hahaha, omg, ok, I’ve got it all wrong, but I’m so glad you cleared that up. I understand it now, and can move forward. I think I’ll just remove that term condition, and create two sections with conditions on element level -one for the scientists, one for all the rest (provided element conditions allow me to do that of course). That suffices for the proof of concept site I’m working on.

I’m still chuckling -my misconception is set in internet stone here :smile: the really silly thing is: I actually do have taxonomy term templates on that site as well, so I used that template term condition. Short circuit in my brain, clearly. Thanks @divadyx !