Support

Account

Home Forums Front-end Issues Hide Thrive Elements if custom fields are empty

Solving

Hide Thrive Elements if custom fields are empty

  • Hello community. I am looking for help with the interaction between ACF and Thrive Theme Builder. I have already created the required custom fields and can access them in my PostTemplate. But now I have posts in which not all custom fields are filled.
    About my problem. In my template icons are visible, which via shortcode dial a phone number, compose a mail, lead to a website, link to a Facebook profile and so on. I would like to hide all icons where the ACF field is empty.

    Has anyone already had experience with this? Order does anyone know a workaround?

    I would be very happy about any help.

  • Following.
    I accidentally managed to get buttons to do this but can’t do it for icons.
    I discovered that if I add a button element and set the Custom Field to dynamically grab the URL field value, then the button would only display if a value existed. Unfortunately the icon element didn’t operate the same way. I’m about to post this query to Thrive Themes.

  • Hi sammamehr, I contacted Thrive Themes and reported our challenges. Nothing came of that. If anything they saw my button workaround as a bug which I promptly corrected them that it is a desired function. I then decided to replace the button with text, link the text to the ACF URL field, then select the linked text and apply a text effect to make it look different from a standard link text.

    It then occurred to me that I could add a custom CSS class to make the text appear as a button! Can learn how to do that here: https://www.w3schools.com/css/css_boxmodel.asp

    For my current needs I was content with the linked text effect. But for your needs of creating an icon, investigate if CSS can provide a workaround.

  • I add a button element and set the Custom Field to dynamically grab

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.