Skip Navigation

[Resolved] Conditional Display of Link Image Not Working Despite Populated Field

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to display content in my template conditionally based on whether or not a custom field has some value. However, it does not seem to be working correctly.

Solution: Change the preview post selection in the Content Template to choose a different post, and reset the dynamic sources for each link.

This support ticket is created 3 years, 11 months 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 6 replies, has 2 voices.

Last updated by andrewF-6 3 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1888919

The issue I am having is a weird one:
1. I am trying to display social media links for projects with conditionals. If there is a link entered into the URL field then display a linkable image that links to the social media profile;
2. If there is no link entered into the URL field then display a greyed out (50% opacity) social media image with no link.

The problem:
1. For some reason the link works with one URL field but not the correct social media URL field in the custom post type;
2. For some reason, sometimes even though the field is empty, it still displays the fully opaque image - meaning it acts as if the field is populated.

The site is only using Toolset Types and Toolset Blocks

hidden link
All the social media links on this page are populated. The image is that of a populated field image however none of the social media links are working.

hidden link
Three of the links are populated but not linkable even though they should be ; the last two are not populated. You can see the difference in the opacity of the images

#1889083

This is an odd one. May I create a clone of this site so I can run some additional tests in my local environment? I'm not able to replicate the same problem in a simple site setup locally.

#1889127

Dear Christian,

Happy Holidays!

Yes please feel free to duplicate or do whatever you must do to the site. I have backups.

I am glad it is not something I was doing wrong - spent hours trying to trouble shoot what is happening and have no idea how to fix it.

Thanks

#1889129

Thanks, I'm creating a site clone and will run some additional tests. My day is closing here so I may not have an update for you until tomorrow, but I'll follow up as soon as I can.

#1889353

Perfect - thank you so much. I appreciate your help. This is an odd one indeed.

#1889923

Strange indeed. I think this is fixed now. First, I changed the post selected up at the top of the Content Template editor to preview with the Ihana post. Then I had to change the link settings for each image so that each link pointed to a custom URL without a dynamic source. Then I reset the dynamic sources for each image icon and resaved those changes. Now I see the links behaving as I'd expect, and reduced opacity images appearing when no links exist. Can you confirm? I suspect something got corrupted in the template, but it's hard to say exactly what happened.

#1890451

My issue is resolved now. Thank you!

I have no idea how you fixed this one or what went wrong but I am very very grateful. Your assistance was quick and effective and your responses detailed and easy to understand... as always.

Thank you so much and Happy New Year.