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');

Let me know what you think on Mastodon, or BlueSky (or Twitter X if you must).

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.

WordPress News

The latest WordPress updates from the WPBriefs Podcast.

Related Posts

11 Jul 2015

Reasons to Use Jetpack with WordPress

It’s no secret that I’m a fan of Jetpack. All the themes we sell on Pro Theme Design support features in Jetpack so I found the slides from this talk about Jetpack for Theme Developers (from WordCamp Montreal 2015) really...
31 May 2007

WordPress tips and tricks – functions.php

Functions.php is a little known wordpress template file. Not many themes take advantage of it but , used properly, it can be incredibly powerful. The file can be used as a way to add your own functions to wordpress themes...
13 May 2010

6 Tips to Build Better WordPress Themes

If you want to make WordPress themes, for clients, to release for free or to sell, then there are a lot of factors you need to take into consideration. Below are some hints and tips that should help ease your...
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...
10 Apr 2015

Adding Menu Descriptions to WordPress Menus

In WordPress there’s an option to add custom descriptions to Menu links – but by default there’s no way to display these descriptions. I’m currently redesigning Binary Moon and wanted to add descriptions to the menu – so I thought...