Skip Navigation

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

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

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 5 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von chrisH-10 vor 4 Jahre, 6 Monate.

Assistiert von: 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

Sprachen: Englisch (English )

Zeitzone: 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

Sprachen: Englisch (English )

Zeitzone: 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 versteckter Link.

#1533163
Dieses Ticket ist jetzt geschlossen. Wenn Sie ein Toolset Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.