Remove Jetpack Social Links

I recently had a theme customer ask how to get rid of the Google plus link on their social menu.

*

My recent themes use a social menu setup similar to the one found in the TwentyNineteen theme. This involves setting up a WordPress menu, and then adding links to your social networks. The theme then uses CSS to target links based on the url, and replaces the text link with an icon.

nav li.icon a[href*="facebook.com"]:before {
  <em>content</em>: '\f204';
}

The idea came from the theme team at wordpress.com, and I’ve been using it for two or three years now.

But this particular theme was made before the newer social menu code. So the social menus were setup with Jetpack Social Links. Except the interface for this no-longer exists.

The code still works, for backwards compatibility, but you can’t disconnect Google+ or the other networks.

The properties are accessed through get_theme_mod, but this is done with filters. They are actually stored in Jetpack Options. The only way I could find to delete them was by using the Jetpack_Options class.

Jetpack::delete_option('social_links');

How was it for you? Let me know on BlueSky or Mastodon

(Please) Link to this page

Thanks for reading. I'd really appreciate it if you'd link to this page if you mention it in your newsletter or on your blog.

Related Posts

27 May 2013

WordPress: 10 Years Young, What Does The Future Hold?

WordPress is now 10 years old. I started using wordpress 9 years ago – which means I joined the WordPress community early on. The reason I chose WordPress is simply because of the fabled 5 minute install process – I...
01 Apr 2015

The State of WordPress Themes #wcldn

I recently spoke on a panel at WordCamp London 2015e. Lance – who used to be the Theme Team lead at WordPress.com – asked me if I wanted to speak on a panel with him at WordCamp London 2015. I’ve...
13 Oct 2016

Lessons Learned from 20 Theme Releases on WordPress.com

In 2007 I partnered with Darren Hoyt to release Mimbo Pro, one of the earliest premium WordPress themes. In 2012 Mimbo Pro was published on wordpress.com. Last week – on October 5th 2016 to be precise – my 20th theme...
22 Nov 2014

WordPress 4.1 Improvements for Theme Developers

WordPress 4.1 is bringing with it a couple of cool new additions for theme developers. They’re things that are currently a bit messy to implement in themes. For me they are things that I do the same way in all...
02 Feb 2012

WordPress Theme Framework: Less Is More – Or Is It?

I have a conundrum. I want to improve Elemental – my WordPress theme framework. I want to make it lean and fast; but this will involve removing functionality. This in turn means that when people upgrade their themes things may...
16 Sep 2016

What is the Difference Between WordPress.org and WordPress.com?

Recently, I’ve received a couple of emails asking about the difference between WordPress.com and WordPress.org versions of WordPress. The reason for the confusion is that I sell themes for both sites – and I often get people buying my themes...