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');
Was it good/ useful/ a load of old rubbish? Let me know 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.