Tell us what you are trying to do?
- I am trying to apply my custom shortcode [extract_domain_from_url] which extracts domain from the URL and compares this URL with a requested using toolset conditional statement but it doesn't work. At the same time, the shortcode itself is working properly. The shortcode is also registered in the Toolset.
The shortcode is created in the functions.php file of the child theme
Is there any documentation that you are following?
- yes, this one: https://toolset.com/documentation/user-guides/views/conditional-html-output-in-views/using-shortcodes-in-conditions/
Is there a similar example that we can see?
- I don't know
What is the link to your site?
- The link to the page with a related view: versteckter Link
- Link to the view where I experience issues: versteckter Link
Hello, would you like to provide login credentials so I can see this in wp-admin? If not, can you copy + paste the complete conditional here for me to review?
I think it was an issue nesting quotation marks. The following conditionals seem to work as expected:
[wpv-conditional if="( $(wpcf-uwc-video-link) ne '' )"]
[wpv-conditional if="( '[extract_domain_from_url url="[types field='uwc-video-link' output='raw'][/types]"]' eq 'youtube.com' )"]
[vc_video link="[types field='uwc-video-link' output='raw'][/types];rel=0&controls=0" el_class="UWCvideo1"]
[/wpv-conditional]
[wpv-conditional if="( '[extract_domain_from_url url="[types field='uwc-video-link' output='raw'][/types]"]' ne 'youtube.com' )"]
<p>Not YouTube ;-)</p>
[/wpv-conditional]
[/wpv-conditional]
Can you confirm?
My issue is resolved now. Thank you!