Skip Navigation

[Resolved] Conditional display of social media icons

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

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 6 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#908901

I'm trying to set up my template to display social media icons only if they have a value to display. Do I do this through a css id? If so is there any documentation I can refer to?

Thanks!

#909095

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Emily,

Thank you for contacting our support forum.

I suspect that the users will fill out a custom field and you only want to display the social icon if that field is not empty.

You can do this by using our conditional shortcode to check if the field is empty.

Take a look at the documentation below and let me know if it helps.
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-fields-and-other-elements-for-emptynon-empty-values/#1-using-the-empty-function
Thanks,
Shane