Search

Table of Contents

Add Social Links to Author Profiles

You are here:

This guide is for the PublishPress Authors plugin. We will show you how to add new social link to author profiles. To do this, we will add a custom field for the social link and then place it in a layout.

  • Go to “Authors” then “Fields” in your WordPress admin menu.
  • Click “Add New.
  • Create your new field for social links. In the image below, I'm using the “Link” field type.
  • Click “Publish”.
New Author Field
New Author Field
  • Go to “Authors”, then “Layouts”.
  • Edit the layout you want to add social links to. In the example, below I'll use the “Boxed” layout.
Author Layouts
Author Layouts
  • Choose the spot in your layout where you want to include social links. In the image below, I'm using the space after the “Description” field.
Follow On Twitter Code
Follow On Twitter Code

I'm using this code to show the Twitter link I created earlier:

<a href="{{ author.twitter }}">Follow on Twitter</a>

Here's how that link appears in the author profile:

Follow On Twitter
Follow On Twitter

Here's another example of code you can use:

<a href="{{ author.twitter }}">Follow {{ author.display_name }} on Twitter</a>

Here's how that code appears in the author profile:

Follow Steve On Twitter
Follow Steve On Twitter

This next example uses the Dashicons feature in WordPress. We have added a CSS class to this link:

<a class="dashicons dashicons-twitter" href="{{ author.twitter }}"></a>

This example produces an icon instead of text in the author profile:

Twitter Dashicons
Twitter Dashicons

Here are some classes you can use for your authors' social links:

class="dashicons dashicons-twitter"
class="dashicons dashicons-rss"
class="dashicons dashicons-facebook"
class="dashicons dashicons-instagram"

Professional publishing plugins for WordPress! Get PublishPress