How to add a Mastodon icon to your WordPress site

Following yesterday’s post, I’d like to do a bit of a follow-up. Sometimes you “just” want to add a Mastodon icon to your site, linking to your Mastodon profile:

I have one just like that on my home page, alongside my other Social Media links.

In this post, I’ll cover 3 different ways to add such an icon to your site.

Share your blog posts on Mastodon with Jetpack

After dipping my toes into the Fediverse for the past few months, I wanted the Jetpack plugin to be there to help bloggers who wanted to interact more with the Fediverse on their sites.

Jetpack includes Sharing buttons that can be handy for your readers to quickly share your posts to their Social Network of choice ; adding a Mastodon button seemed like a no-brainer!

Mention other ActivityPub users right inside your WordPress blog!

If you’re actively blogging on WordPress and have been playing with Mastodon et al. in the past few months, you probably came across the ActivityPub plugin for WordPress.

The plugin implements the ActivityPub protocol for your site. It allows others to follow your blog from their Mastodon / Pleroma / GoToSocial account. If they reply to one of your blog’s posts there, their reply will be posted as a comment on your blog.

This is already pretty neat! But starting today with the release of version 0.16.1 of the plugin, you can even mention other ActivityPub users in your posts. When you hit Publish, they’ll be notified of your post inside their client of choice.

WordPress as Social Media?

I’m re-publishing a conversation I had a few days ago on the Fediverse, following an excellent question from Phil Johnston:

If you’re a WordPress person who publishes more on social media than on your WP site (sadly this is still currently me), does that say anything about WordPress?

Phil Johnston (@[email protected])

I felt compelled to reply, as I’ve struggled with some version of this question myself for years. Fair warning, I’m heavily involved with WordPress, so my answer is quite biased :)

I am heavily involved with WordPress, yet I don’t post that often on this site.

What does this say about WordPress?

Jetpack: remove External Media from the block editor

The Jetpack plugin comes with a number of blocks and editor extensions. One of those features extends the existing Media blocks, and adds an option to find and upload images from Google Photos or Pexels:

While this can be super useful when you use Google Photos or need to find free stock photos for your posts, you may sometimes prefer to only see the default “Media Library” option.

Playing with time intervals in WordPress

I’ve recently had to think about calculating time intervals in a little WordPress plugin of mine, and I thought I would share my findings. Maybe some of you will have some ideas on how to improve things even further :)

SVN and @ characters: peg revision is not allowed here

This has got me stuck a few times in the past few months so I thought I would write this down and get this committed to memory, once and for all!

When working with SVN and trying to add or remove a file that includes the @ to your working copy, you will run into a peg revision is not allowed here error:

svn rm modules/sharedaddy/images/[email protected]
svn: E200009: 'modules/sharedaddy/images/[email protected]': a peg revision is not allowed here

That is because SVN uses the @ symbol as a way to determine a specific revision, like so:

svn info [email protected]
Path: readme.txt
Name: readme.txt
URL: https://plugins.svn.wordpress.org/jetpack/trunk/readme.txt
Relative URL: ^/jetpack/trunk/readme.txt
Repository Root: https://plugins.svn.wordpress.org
Repository UUID: b8457f37-d9ea-0310-8a92-e5e31aec5664
Revision: 2021803
Node Kind: file
Last Changed Author: jeherve
Last Changed Rev: 2021532
Last Changed Date: 2019-01-29 22:57:37 +0100 (Tue, 29 Jan 2019)

To work around that, all you need to do is add an @ symbol at the end of the filename, like so:

svn rm modules/sharedaddy/images/[email protected]@
D         modules/sharedaddy/images/[email protected]

Problem solved!

Watched a movie or a TV show? Log it in WordPress with Traktivity

Do you watch a lot of movies or TV Shows? Do you have a WordPress site? You will love Traktivity!

This plugin allows you to log everything you watch inside your WordPress site. You may then use that data for anything you want.

You could display the last few shows you watched in a widget in your sidebar, you could automatically post on Facebook or Twitter whenever you are watching something, or you could just keep that data to find out more about the genres you watch the most, or how many hours you spent in front of the TV last month or last year.

Most importantly, that data is yours, saved in your WordPress site for good.

A few days in Albuquerque

Working for Automattic is pretty great. Not only is the work fun and challenging, I also get to travel quite a bit. In the past few years, I’ve discovered San Francisco, Pune, Kauai, Dublin, and many other interesting places.

This month I added two more cities to my list: Madrid, Spain, and Albuquerque, New Mexico. I didn’t take many pictures in Madrid, but I know my colleague Donncha will keep adding more pictures from our trip to his photo blog in the next few months. 😊

I did, however, take a few pictures in Albuquerque.

Jetpack: move Jetpack Ads further down in a post

You’ve probably heard about Jetpack’s new Ads module: it allows you to insert ads in your posts, in your sidebar, and in the header of your WordPress site without having to worry about finding the right ad network, managing ad inventory, or worrying about the quality of the ads. It’s available to Jetpack Premium and Professional users.

To use the feature, all you have to do is to click on the toggle under the Jetpack menu in your dashboard. Jetpack takes care of the rest.

However, sometimes you may not be happy with the default placement of the in-post ads: they appear right below the post content. That’s great, but sometimes you may be using other plugins to insert elements in there, like sharing buttons, related posts, subscription forms, …

The code snippet below will allow you to move the ad box exactly where you want it to appear.