Display and hiding ACF fields and labels?

Posted in: Newspaper
Post count: 1

Hi,
First of all thanks for make such a great theme.
We are looking to integrated ACF to display some contact information fields (phone, email and whatsapp).
When we use the example in this link we can see the data, but we need some assistance with the proper formatting.
https://forum.tagdiv.com/topic/display-advanced-custom-fields-on-post-pages/

In our case we are trying to add the extra contact field data to our travel site, so we can also add post as listings for business when needed (just like one of the NYC sites).

This is our structure:https://tinyurl.com/y78bj2mh
And our fields are:

Telefoon 1: [acf field=”telefoon_1″]<br>
Telefoon 2: [acf field=”telefoon_2″]<br>
Telefoon 3: [acf field=”telefoon_3″]<br>
Telefoon 4: [acf field=”telefoon_4″]<br>
Telefoon 5: [acf field=”telefoon_5″]<br>
WhatsApp: [acf field=”whatsapp”]<br>
E-mail: [acf field=”e-mail”]

We need to only show the labels when the fields are populated and have to display the fields next to each other without the <br> (otherwise when empty other pages will get spaces.

We are also looking to like the whatsapp to an url (https://wa.me/field) to be clickable and also the email fields should be to mailto:

Is there any way you can help achieve this, otherwise we don’t see the theme working for us 🙁

P.s.: we tried some php in the shortcode field, but this isn’t working.
https://www.advancedcustomfields.com/resources/hiding-empty-fields/

Regards,
Robert

Post count: 21065

Hello Robert!

Please provide your website link, so I can see how this is displaying.

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.