Skip Navigation

[Gelöst] Conditional using shortcode in if not working

This support ticket is created vor 4 Jahre. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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: Asia/Kolkata (GMT+05:30)

This topic contains 5 Antworten, has 2 Stimmen.

Last updated by chrisH-10 vor 3 Jahre, 12 Monate.

Assisted by: Minesh.

Author
Artikel
#1529537

Hi there, going by Shane's answer in https://toolset.com/forums/topic/how-to-display-wpv-conditional-with-multiple-apostrophes/ the below should work.

[wpv-conditional if="( '[types field='index-description-2' output='raw' suppress_filters='true' item='$parent'][/types]' ne '' )"]index-description-2[/wpv-conditional]

The shortcode [types field='index-description-2' output='raw' suppress_filters='true' item='$parent'][/types] in the *if* works file by itself if I put it on the page.

#1530225

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I do not know yet but from where you see that suppress_filters='true' attribute is available.

From the code you shared - it seems you are trying to get the value of some parent field? Can you please tell me your post-relationship structure and what field value you want to check?

#1530705

I don't quite understand what you're trying to say in that sentence, but I tried without the suppress_filters='true' and that makes no difference.

The relationship is that there is a Page Template which references a View. The View iterates over child pages (WP page heirarchy). This View contains the conditional with the problem.

#1531425

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

As you mentioned with another ticket - indeed, it seems we have timezone difference.

Can you please share problem URL and access details where you have added the conditional statement so I can check whats going wrong there.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1532393

As reported on line 14 you will see the exact shortcode that is part of the if on line 15.
[types field='index-description-2' output='raw' suppress_filters='true' item='$parent'][/types]

On the front end you will see the successful output of line 14 as a chunk of text between tiles like this hidden link.

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