I have an author box on my single post template. At the bottom of the box, there is a row of social icons for various social links for each writer/author. These are all pulled from an ACF CPT called “Writers”. So, each writer could enter all of their various social links, personal websites, meeting bookings, etc…
However, since each writer would have different social links, more or less, I only want to show those icons with a link. For example, if a writer doesn’t enter their LinkedIn profile URL, I don’t want to show the Linkedin Social Icon.
I’m trying to figure out how to construct a function, echo? That will look in the href and see if it starts with an “http”. This way I can include it on all of the links, even though they have different database fields. If the Icon links don’t have URL’s the Href will be empty.