Skip Navigation

[Resolved] Split: Issue using the new Divi 4.0 Theme Builder

This support ticket is created 5 years ago. 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.

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)

Tagged: 

This topic contains 9 replies, has 3 voices.

Last updated by toolset-dave 4 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#1378857

Hi Shane,

I also have to confirm that the issue with conditionals is not working after Divi 4.0.6 update.

#1378873

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

#1379149

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

#1389051

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

#1389281

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?

#1389473

Also I cannot get working conditional for featured image.

#1389547

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

#1391389

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.

#1392245

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

#1392529

Hi Minesh,

thank you, it works fine. My issue is resolved now.