Configure Social Accounts in General Settings or Theme Code

The tutorial on how to add social networks to a Ghost site seems to be outdated since it seems that the Casper theme has changed since then (e.g. the Secondary Navigation is now in the footer rather than in the top right of the theme).

I wanted to ask if anyone has discovered a work around through this. Perhaps updating the General Settings to add social accounts with Custom Settings, adding code to the theme (where and how) or through other methods.

So far I have found this post by @EmpiricalEE on replacing the default social accounts in general settings useful as a temporary solution to replace either facebook or twitter by another social network.

Thanks everyone in advance.
Best,

2 Likes

I’m using Custom Settings to add Instagram, Dribbble, YouTube, LinkedIn, and Email fields to a theme I’m working on. Here is how I’m doing it.

In the theme package.json

"custom": {
  "instagram_page": {
    "type": "text",
    "default": ""
  },
  "dribbble_page": {
    "type": "text",
    "default": ""
  },
  "youtube_page": {
    "type": "text",
    "default": ""
  },
  "linkedin_page": {
    "type": "text",
    "default": ""
  },
  "email": {
    "type": "text",
    "default": ""
  }
}

The fields will be visible under Design > Site-wide

In a theme template file.

{{#if @custom.instagram_page}}
  <a href='{{ @custom.instagram_page }}'>Instagram</a>
{{/if}}

{{#if @custom.dribbble_page}}
  <a href='{{ @custom.dribbble_page }}'>Dribbble</a>
{{/if}}

{{#if @custom.youtube_page}}
  <a href='{{ @custom.youtube_page }}'>YouTube</a>
{{/if}}

{{#if @custom.linkedin_page}}
  <a href='{{ @custom.linkedin_page }}'>LinkedIn</a>
{{/if}}

{{#if @custom.email}}
  <a href='mailto:{{ @custom.email }}'>{{ @custom.email }}</a>
{{/if}}
3 Likes

increidble work, I will try it out so thank you so much for sharing!

1 Like