Add a Shortlink Button in WordPress

How to Add the Get Shortlink Button Back into WordPress

Do you want to Add the Get Shortlink button back into WordPress? Shortlinks are a shorter version of your URL, which is extremely helpful when sharing your website on social media platforms like Facebook, Twitter, and Instagram.

Posts on these platforms are usually short and concise, which makes long URLs a bad thing. Unfortunately, in the WordPress version 4.4 update, this button was removed.

If you heavily relied on this button for your social media needs, you are probably missing or have found another way to shorten your links. If not, I can help you restore this button very easily to resume your needs.

Today, I will demonstrate how to add the Get Shortlink button back to WordPress.

Why Shortlinks Can Help Your Website

Social media is the most popular type of media in today’s world. Social media websites have the most traffic out of all websites in the world and that’s what makes them the best place to advertise.

Facebook alone gets over 1 billion monthly users and the other platforms have their own insane stats. 1 billion is a huge number, but sometimes that is hard to fathom. 1% of 1 billion is 10,000,000, yes ten million, while .1% is 1,000,000.

Tapping into even the smallest percentage is a huge win for any website.

Social media continues to grow year after year and how you present your information changes extremely often. One thing that remains constant is what is successful. Short and concise posts get the best results and shorter URLs help you achieve this.

How to Add the Get Shortlink Button to WordPress

Today, I will demonstrate adding the button to get a short link for your content. There are three easy ways to accomplish this. The first is to use the Bitly’s WordPress Plugin to add it back.

This is by far the easiest method because all you have to do is activate the plugin.

If you are not a fan of adding another plugin to your website, don’t worry, you can use code. The coding method is extremely easy as well and takes just two simple lines of code in your theme’s functions.php file.

Method 1: Bitly’s WordPress Plugin

Step 1: Install Bitly’s WordPress Plugin

Let’s start off by clicking on Plugins and selecting the Add New option on the left-hand admin panel.

Add New

Search for Bitly’s WordPress Plugin in the available search box.

Bitly's WordPress Plugin

Scroll down until you find Bitly’s WordPress Plugin and click on the “Install Now” button and activate the plugin for use.

Install Bitly's WordPress Plugin

Step 2: Connect With Bitly

While all the options you need to create short links are in place, they won’t actually work until you connect a Bitly account with this plugin. Luckily, that’s pretty easy to do.

Click on Settings and select the Writing Option.

Scroll down and you will see a WP Bitly section, this is the plugin’s old name. Click on the big Authorize button.

Authorize

A small window will pop up, you can either log in to a Bitly account if you have one or create a new one for free. Since the process is pretty straightforward, I’ll leave this to you.

Just remember to save the login info for your Bitly account as you’ll need it to view all of the data your links generate.

Once the account is authorized, it will fill in the Bitly OAuth Token box. Once this is filled in, save the changes and you are good to go.

Step 3: Generate Shortlinks

Now that you have a Bitly account and have connected it to your website, you are ready to start generating short links for your posts and pages.

Visit any page or post on your website or create new ones. On the right-hand sidebar in Gutenberg, you’ll see a WP Bitly option. Click the feature to expand it. Then, just click on the Generate New Shortlink option.

Generate Shortlink

Congratulations, you have successfully added a way to create a short link directly on your WordPress posts and pages.

Method 2: Coding Approach

Let’s start by logging into the cPanel and clicking on the File Manager option. The File Manager will allow you to access all of the files related to your website.

Click on the File Manager option.

You need to locate your theme’s functions.php file. Click on the public_html directory, then click on the wp-content folder. Inside this folder, you will find all of the content related to your website.

Click on the themes folder and enter the folder of the theme you are currently using. Finally, right-click on the functions.php file and select the Edit option.

Select the "Edit" option.

A pop-up window will show up. This box will warn you to create a backup of your files before editing anything. This will ensure that you can revert your website back to when it was working if something goes wrong.

Click on the “Edit” button. A new tab will open containing all of the code from the file.

Click on the "Edit" button.

Copy and paste the following lines of code into your functions.php file:

add_filter( 'get_shortlink', function( $shortlink ) {return $shortlink;} );

These lines will add the Get Shortlinks back to your website. Once you have inserted the code into the functions.php file, click on the “Save Changes” button to finish.

Click on the "Save Changes" button.

Congratulations, you have added the Get Shortlinks button back to WordPress without using a plugin.

Method 3: Using Jetpack to Add the Get Shortlink Button

Another option worth using is Jetpack. This plugin has just about everything, so, it’s no surprise that you can add a short link button with it. However, you will need to activate the correct module first, but it’ll only take a minute.

Step 1: Install Jetpack

To begin, install and activate the Jetpack plugin.

Install and Activate the Jetpack plugin

NOTE: You’ll need to create a free WordPress.com account to really get the most out of Jetpack.

Step 2: Activate the Shortlink Module

Click on Jetpack and select the Dashboard option. Scroll down to the bottom of the Dashboard and click on the Modules option.

Click on the Modules Option

Here, you will find a full list of modules available in WordPress. Each one adds a specific feature to your installation. Search for the WP.me Shortlinks module and activate it.

This will add the WP.me shortlink button to the WordPress editor.

Activate the WP.me Shortlinks Module

Step 3: Copy the Shortlink

Now go to any post or page on your website and click on the Jetpack symbol in Gutenberg.

Click on the Jetpack Symbol

You’ll now see a Shortlink option. Unlike the first plugin, the short link is automatically generated on every post and page, so, all you need to do is actually copy it. To do so, click on the “Copy” button and you will have your short link saved on your computer’s clipboard.

At this point, you can paste it virtually anywhere you can use a URL.

Click on the Copy Button

Congratulations on setting up Jetpack’s short link module in WordPress.

Effectively Use Social Media

The main use of shorter URLs is for social media platforms and if you are not using social media platforms, you will not succeed. These are the biggest and easiest ways to get the word out about your website.

Every website and company of any size uses these platforms to get their messages and the latest products out there. The reason is simple, it’s effective and has great results. Use social media to your advantage when you want to expand your website.

Which method have you chosen to use? Which social media platform do you like the best?

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.