[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.
[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.
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?
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.
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.
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.