Simple social connect links with Advanced Custom Fields and Font Awesome

Share to:

social-connect-links-sm_7Need to spin up a simple connection tool for a new WordPress project you’re working on? This might do the trick.

I’m working on a new site with a lot of really cool functionality. One of the things we’re doing is creating a custom post type for a “staff member”, and part of that post type is having a selection of fields where a content manager can simply place the link to the staff member’s profile and have it display on their profile page.

I wanted this to be super easy and straight forward for the person working with the profiles in the future, so I used Advanced Custom Fields to create a set of custom fields, each one for a separate social media platform.

The custom fields look like this:

acf-font-awesome

Pretty simple. Just text fields with no formatting, each labeled appropriately for the social network I’m trying to connect, so visitors can click through to their profiles.

Next is the code that I put in to my template.php file to render those links. This is what that looks like:

This too, is pretty straightforward. I’ve got each one set up with a Font Awesome icon link as the link.

Then we get an output that looks like this:

output

Simple, straightforward, and to the point.