Skip Navigation

[Resolved] ipv-conditional with parent is not working

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)

This topic contains 0 replies, has 1 voice.

Last updated by geertV-3 5 months, 2 weeks ago.

Assisted by: Minesh.

Author
Posts
#2797206

I have this code and it's not working. Any idea

[wpv-conditional if="( $(facebook).item(@organisatie.parent) ne '' )"]do something[/wpv-conditional]

I also tried with NOT(EMPTY... but also not working

Can you pleas help

Thanks!

#2797239

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

What if you try to use the following conditional statement:
[wpv-conditional if="( '[types field='facebook' item='organisatie.parent']' ne '' )"]
do something
[/wpv-conditional]
[/php]

Does that helps?

#2797262

It's not working
I don't use it in php but in the editor of WordPress
So maybe that's the problem

When I use your code with or without [/php] I can't save it anymore.

#2797280

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please send me problem URL and where exactly you want to display that conditional content.

*** 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.

#2797501

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I checked but somehow the admin access details you shared is not working at this end.

Can you please send me working admin access details.

I have set the next reply to private which means only you and I have access to it.

#2797916

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now: hidden link

I've created the following conten tempalte and added the following code:
=> hidden link

<p style="font-weight: 400;">
  
  [wpv-conditional if="( '[types field='facebook' item='@organisatie.parent'][/types]' ne '' )"]
  <a style="display: inline-block; float: left; padding-right: 5px;" href="[types field='facebook' item='@organisatie.parent'][/types]">
    <img class="alignnone wp-image-79587" src="<em><u>hidden link</u></em>" alt="" width="30" height="30" /></a>
  [/wpv-conditional]
  
[wpv-conditional if="( '[types field='twitter' item='@organisatie.parent'][/types]' ne '' )"]<a style="display: inline block; float: left; padding-right: 5px;" href="[types field='twitter' item='@organisatie.parent'][/types]"><img class="alignnone wp-image-79588" src="<em><u>hidden link</u></em>" alt="" width="30" height="30" /></a>
[/wpv-conditional]
  
[wpv-conditional if="( '[types field='instagram' item='@organisatie.parent'][/types]' ne '' )"]<a style="display: inline-block; float: left; padding-right: 5px;" href="[types field='instagram' item='@organisatie.parent'][/types]"><img class="alignnone wp-image-79589" src="<em><u>hidden link</u></em>" alt="" width="30" height="30" /></a>
  [/wpv-conditional]
</p>

Then with your content template where you actually wanted to display the icons:
=> hidden link

I've removed the existing conditoinal code and instead added the above content template using the shortcode: [wpv-post-body view_template="ct-for-conditional-icons"]

More info:
=> https://toolset.com/documentation/legacy-features/views-plugin/checking-fields-and-other-elements-for-emptynon-empty-values/
=> https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-153372

#2797924

Thank you very much. It works