Updating Twitter icon to X logo

professor farnsworth futurama GIF

We’ve temporarily added the X logo as an available icon in core Discourse to allow everyone to make the branding switch on their own. Upgrading the entirety of Font Awesome in Discourse is a very large project, so this is meant to allow a workaround in the mean time.

If you’re looking to make the change, you can follow these steps:

  1. Add temporary-twitter-x to your svg icon subset site setting

  2. Create a new theme component and add the following code to the noted sections:

    Common > Head

    <script type="text/discourse-plugin" version="0.11">
      api.replaceIcon('fab-twitter', 'temporary-twitter-x');
    </script>
    

    Common > Color Definitions

    :root {
     --twitter: $twitter-or-white: dark-light-choose(unquote("#000"), unquote("#fff"));
    }
    

And that should be that. :slight_smile: :+1:

You may also wish to update your site text customisations to use the new branding if you haven’t already:

/admin/customize/site_texts?q=twitter

Hopefully this will suffice until a more permanent solution is in place :crossed_fingers: (or it gets changed to something entirely different next month :slight_smile:)

15 Likes

When this eventually happens, will it be optional? I don’t care what Elon says, I’m calling it Twitter, it is not “x”, and I’m keeping it that way on my sites. The logo looks bad anyways, I want to keep the bird.

2 Likes

Even if it was the default behavior, you could still use the same code in reverse to replace the 𝕏 with the :bird:.

5 Likes