Hi Shane,
I also have to confirm that the issue with conditionals is not working after Divi 4.0.6 update.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Dave,
Thank you for getting in touch.
Would you mind allowing me to have admin access to the website so that I can have a look at this for you ?
Also please let me know the page where I can see the issue.
I will also need to grab a copy of your website if needed.
The private fields have been enabled for your next response.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Dave,
I was able to confirm this issue and made a report to our 2nd tier supporters for further debugging.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Dave,
Thank you for the continued patience.
Could you try running your conditionals with your shortcodes by setting the ID of the posts explicity like this.
{!{wpv-conditional if="( '{!{types field='single-line' id='$current_page'}!}{!{/types}!}' eq '' )" }!}
Single line is empty
{!{/wpv-conditional}!}
The above is an example of how to get it to work.
If this works please let me know as soon as possible.
Thanks,
Shane
Hi Shane,
I have tried the code, but it did not work.
In another thread some user solved this: https://toolset.com/forums/topic/conditional-output-not-working-in-divi-4-0-6-theme-builder-post-body-template/#post-1388551
{!{wpv-conditional if="( $(wpcf-single-line).item($current_page) eq '' )"}!}
Single line is empty
{!{/wpv-conditional}!}
Do you think it is just temporary workaround and the basic form of conditionals will work in future?
Also I cannot get working conditional for featured image.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Dave,
Unfortunately this one is really out of our control. However the user in the ticket used our conditionals with square brackets.
Could you try using the square brackets and let me know if it works?
[wpv-conditional if="( $(wpcf-single-line).item($current_page) eq '' )"]
Single line is empty
[/wpv-conditional]
Also try it like this as well.
[wpv-conditional if="( '[types field='single-line' item='$current_page'][/types]' eq '' )" ]
Single line is empty
[/wpv-conditional]
Please let me know if this helps.
Thanks,
Shane
Hi Shane,
the code I wrote (https://toolset.com/forums/topic/split-issue-using-the-new-divi-4-0-theme-builder/#post-1389281) works for me. I should mention it better. But I have a problem with conditional of featured image, I could not get it working.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Shane is on vacation. This is Minesh here and I'll take care of this ticket. Hope this is OK.
I've adjusted the code conditional code as given under to display the featured image conditionally.
{!{wpv-conditional if="( $(_thumbnail_id).item($current_page) ne '' )"}!}<div class="nahledovy-obrazek">
<img src="{!{wpv-post-featured-image size='custom' width='2880' height='450' crop='true' output='url' item='$current_page'}!}" style="width: 100%;max-height: 450px;">
<h1 class="nadpis-h1"><span class="vlastnosti-h1">{!{wpv-post-title}!}</span></h1> </div> {!{/wpv-conditional}!}
{!{wpv-conditional if="( $(_thumbnail_id).item($current_page) eq '' )"}!} <h1 class="nadpis-h1-bez-obrazku"><span class="vlastnosti-h1" style="background-color: #ddc180;">{!{wpv-post-title}!}</span></h1> {!{/wpv-conditional}!}
Can you please confirm it works at your end as expected:
- hidden link
More info:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-fields-and-other-elements-for-emptynon-empty-values/#checking-if-a-post-has-a-featured-image
Hi Minesh,
thank you, it works fine. My issue is resolved now.