WAIT: Element Condition Not Working (for CPT Terms)

I have a CPT with a single post template and a pop-up on the single post page. Now, some elements must be displayed dynamically by a CPT taxonomy. I created these with the MB plugin.

I set a condition to display an element if the CPT term ID == [id_number]
image
Nothing shows, despite the post having a term whose ID is 54.

In addition, it seems I’m not the only one having this issue, I saw elsewhere where someone complained about a similar issue.

You can use this condition only on taxonomy page

@Matej & @timmse

Here’s the element condition issue I talked about

Hi @abey,

Yeah, you are on a post page, so {terms_id} will not work as you want it (like @Illarion mentioned) You can try this by simply trying to output {term_id} in a basic text element, and you will see what happens. :wink:

Now, what you probably need, is a custom function, that will check for the current post, if any of the terms is a term with XY ID. Then you can use it with {echo:check_terms(54)} or something like this.

Hopefully, I understand correctly and this will help you achieve it.
Matej

Hi,

The taxonomy is Ura Obanyi and in it is a term called Ura Oweyi

In the dynamic data tag, I see the name of the taxonomy I created for the CPT.
So I used {ura_obanyi} == 54 (which is the ID of Ura Oweyi) and it still didn’t work/

Hi,

so, if you add {post_terms_ura_obanyi} or similar (pick it up from dynamic tag picker), what is the output?

This is what I used.

{post_terms_ura_obanyi}

image

Is there anything like {post_term_id}?

Yes, I understand. Add this dynamic tag to the basic text element, and check what the output is. I’m quite sure that it’s not 54 :slight_smile:

Check it on the front end, and let me know.
Matej