Skip Navigation

[Resolved] conditional doesn´t work

This support ticket is created 2 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+00:00)

This topic contains 10 replies, has 2 voices.

Last updated by heinrichT 2 years, 9 months ago.

Assisted by: Jamal.

Author
Posts
#2117325

I´m creating a single post and I want a field to be shown only when custom field ist not empty.
It´s not working on most of the fields, just one is working perfectly.

Link to a page where the issue can be seen: hidden link

Language field whih are empty shouldn´t be visible.

#2117349

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello and thank you for contacting Toolset support.

Instead of testing if the field is empty, test if it has a different value than an empty static value. Check this screenshot hidden link

I did it for French, and it seems to work as expected. Check this screenshot hidden link

I hope this helps. Let me know if you have any questions.

#2117365

Hi Jamal,

now it's not showing when it should be....

#2117367

I have a second iusse at the Archiv die-Promoter.

I have an overflow on mobile and can´t fix it. Can you please help me?

Best wishes

#2117401

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello! Can you please elaborate more on what is not showing?

And regarding the overflow issue on mobile, can you add a screenshot to help me understand it?

#2118623
Bildschirmfoto 2021-07-19 um 07.06.03.png

Hi Jamal,

1) enclosed you find 2 screenshots where you can see, that dataset contains the information "Franzöisch: fließend" but doens´t show it on the front page.

#2118633
IMG_0114.jpeg
IMG_0115.jpeg
IMG_0116.jpeg

2) find enclosed the overflow screenshot

New threads created by Jamal and linked to this one are listed below:

https://toolset.com/forums/topic/overflow-issue-on-mobile/

#2118731

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Sorry, my mistake. The NOT operator should not be used on the condition. Check this screenshot hidden link

For support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I have created another ticket about the overflow issue on mobile. I'll be posting my reply on it, as I need more details from you.

#2118849
Bildschirmfoto 2021-07-19 um 14.52.25.png

Hi Jamal,

if I don´t use the NOT operator than the field is visible all the time. Please check screenshot.

#2118901

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

It's not the NOT of the condition. The custom field "ts_sprache_italienisch" does hold a one-space string, which evaluates as different than empty string and displays the block. Check this screenshot hidden link

I remove the one-space and saved the post, and it does not appear anymore on the frontend. hidden link

I'll let you do the same for the "ts_sprache_polnisch" custom field to see how does it work.

Finally, just to help us help you, please share a URL whenever possible. That way we can go directly to the relevant post/view/content template/archive instead of searching for it or guessing if that's the one with the issue 🙂

#2119163

Hi Jamal,
Thanks for your support. It is working now.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.