Would you like to create short links to your WordPress blog entries or pages?
Short links are useful for sharing in your emails, Facebook messages, and even instant messages.
In this article, we will show you how to generate short links using a plugin, and how to add the ‘Get Shortlink’ button back to the classic WordPress editor.
Why Create a Short Link in WordPress?
Sharing your web content on social media can construct user engagement and bring new users to your site. However, pasting in long links or URLs isn’t always the most ideal way.
That’s because some social media platforms will restrict the quantity of characters you can use. A shorter URL gives you extra space for more useful substance, which can lead to greater engagement and traffic to your WordPress site.
That’s the reason URL shortener administrations like Bitly and TinyURL were originally created. They take a long link and make it shorter with the goal that it doesn’t take up as much space.
In the past, WordPress made it easy to get a short link to your blog entry or page. There was a Get Shortlink button located right close to the permalink area of the classic editor.
However, if you as of late started your blog, then you won’t see this feature on your WordPress webpage because it was eliminated after WordPress adaptation 4.4. WordPress actually creates the links, yet the button has been taken out.
In any case, there are a couple of ways you can get short links for your WordPress posts and pages.
We’ll cover the best link shortener plugin, in addition to several ways you can restore the ‘Get Shortlink’ button in the classic editor.
Method 1: Create Short Links Using the Pretty Links Plugin
We’ll start with a method that works for everybody. The Pretty Links plugin doesn’t depend on the classic editor and will create its own short link out of any URL.
It works with all links, including pages outside of your blog or site. Thus, other than letting you share your own substance, it’s also the ideal tool for shortening affiliate links.
To begin, you’ll need to install and activate the Pretty Links plugin.
Note: There is a Pro version of Pretty Links with all the more impressive features like catchphrase auto-linking and link categories and tags, yet for this tutorial, we will use the free form.
When you activate the plugin, a Pretty Links segment is added to your WordPress dashboard. To create your first short link, you need to go to the Pretty Links > Add Link page.
Then, you need to paste the original URL of the page you want to share into the Target URL text field. A short Pretty Link is automatically created, yet you can customize it if you’d prefer to make it more readable.
Whenever you’ve created a couple of short links, you may not recall what they are all for. So it’s a smart thought to type in the title of the site page and consider writing a few notes of anything you need to recollect.
Read More: How to Clear Cache in WordPress
Whenever you have filled in the Pretty Links structure, click the Update button to activate the short link.
You will now see a rundown of all of your Pretty Links. To copy one to the clipboard, simply click on the Copy symbol at the right of the screen.
After that, you can paste it into any of your social media channels. Pretty Links will even monitor how many clicks each link gets.
This is a straightforward method of adding back the Get Shortlink button to the classic editor.
To begin with, you need to install and activate the Bring Back the Shortlink Button plugin.
Upon activation, this plugin will automatically add the Get Shortlink button to the classic editor. To make sure that it worked, simply alter any of your posts.
At the point when you click the Get Shortlink button, it will show you the WordPress Shortlink for your post or page. You can copy the link to the clipboard so you can share it with your audience in your emails and messages.
Method 3: Creating a Short Link Button in the Classic Editor with Code
This method is intended for further developed users and uses code rather than a plugin. It adds the Shortlink button to the classic editor by adding a custom code scrap to your subject’s functions.php file.
We don’t prescribe this method to inexperienced users because if you make a mistake, then it could break your site. Method 2 above is an easier way to achieve the same outcome without needing to use code.
If this is your first time adding code to your WordPress files, then you should look at our aide on how to copy and paste code scraps in WordPress.
We’ll use the Code Snippets plugin referenced in that aide, so you’ll have to install that first. For additional details, see our bit-by-bit guide on how to install a WordPress plugin.
Upon activation, the plugin will add another menu thing labeled Snippets to your WordPress admin bar. Clicking on it will show you a rundown of all the custom code bits you have saved on your site.
Feel free to click on the Add New button to add your first custom code piece in WordPress.
This will bring you to the ‘Add New Snippet‘ page.
You need to start by entering a title for your custom code bit. How about we call it ‘Short Link Button‘. After you enter a title, basically copy and paste the code scrap beneath into the code box.
At the point when you run over this scrap, later on, you may not recollect what it’s for. So it’s a smart thought to type something supportive in the depiction as a reminder.
You can also assign tags to your code scrap. This will assist you with sorting your code scraps by topic and functionality.
Finally, you need to click on the ‘Save Changes and Activate‘ button. When the scrap is activated, the Shortlink button will be added to the classic editor.
We trust this article assisted you with learning how to create a short link in WordPress.