Skip to content

Instantly share code, notes, and snippets.

@dartiss
Created November 18, 2022 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dartiss/3438920890381349cc2bf2aab6d383ba to your computer and use it in GitHub Desktop.
Save dartiss/3438920890381349cc2bf2aab6d383ba to your computer and use it in GitHub Desktop.
Add Mastodon verification to a WordPress site
function add_mastodon_verification() {
?>
<link rel="me" href="[your Mastodon profile link]">
<?php
}
add_action( 'wp_head', 'add_mastodon_verification' );
@dartiss
Copy link
Author

dartiss commented Nov 18, 2022

This code will allow you to verify your website with Mastadon - when your site is then listed on your profile, it will show in green, as verified.

  1. Add to your functions.php file in your theme folder, replace the bit in brackets (inc. the brackets) with a link to your Mastodon profile.
  2. Go to Mastodon, click on Edit Profile
  3. Under Profile Metadata add a link to your website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment