I continue to have big problems with the
Logic tag. While my other post remains unsolved, I am trying to create a Logic for ACF relationship fields.
Here’s what happens:
Let’s say that I have a custom post type called
day has an ACF relationship field named
lesson relationship field points to another custom post type called
discipline custom post type has, of course, a
title field (and various other fields).
So, for example, I have a custom post called
Monday and a custom post called
Monday custom post, the relationship field
lesson points to
Now, I want to show only the custom posts that have
Latin in the
discipline relationship field.
I’m using the following and expecting to receive as result:
<Set logic="disciplines_logic" all=true> <If acf_relationship="lesson" title="Latin">true<Else />false</If> </Set> <Loop type="day"> <If logic="disciplines_logic"> <Field title /> </If> </Loop>
However, nothing gets displayed.
Either I don’t understand how to use the
Logic tag (very likely), or I am doing mistakes with the syntax. In case it’s the latter, I also tried the following variant of the
<If acf_relationship="lesson" field=title value="Latin">true<Else />false</If>
This doesn’t work either.