Skip Navigation

[Closed] Conditional block for country not US

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 2 replies, has 2 voices.

Last updated by Minesh 1 year, 9 months ago.

Assisted by: Minesh.

Author
Posts
#2605435

jww
Screenshot 2023-05-11 at 8.09.37 PM.png
Screenshot 2023-05-11 at 8.09.06 PM.png

I think I'm close to making something work but can't quite get it.
I have a list of Airports. There is a custom field in the field group airports for Airport Country.
I only want the country to show if it is NOT the United States as the value.

I have a conditional block with a single field and it's working great. If I change the country to Canada, it shows up. If it's United States, it doesn't show up.
But, this block is too far/too much space from the City, State in a different block above it.
So for City, state I have it like this in a fields and text block (above the working conditional one)
<p>[types field='airport-city'][/types],  [types field='airport-state'][/types]<span class="tb-shortcode-placeholder"> </span></p>

If I could get this to work, then there wouldn't be a big gap between City, State line and Country on the line below it if not United States.
<p>[types field='airport-city'][/types],  [types field='airport-state'][/types]<span class="tb-shortcode-placeholder"> </span><br />[wpv-conditional if="( ( $(wpcf-airport-country) ne 'United States' ) ) "].</p>

I got to that by looking at the advanced editor. The only thing that shows up is the .
So clearly I didn't do it right.
Can you help me tweak this into place?

#2605605

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL and admin access details and share what is your expected output on what post/page.

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

#2606269

Minesh
Supporter

Languages: English (English )

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

Thank you for sharing admin access details but unfortunately 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.

The topic ‘[Closed] Conditional block for country not US’ is closed to new replies.