Do you want to create a shortlink of your WordPress blog posts, pages or product? WordPress shortlinks are useful for sharing in your emails, facebook messages, or even text messages. It was a default feature until WordPress version 4.4. In this tutorial, we will share how to restore the get shortlink button in WordPress.
What is the Get Shortlink Button in WordPress?
Get Shortlink button is a WordPress feature that allows you to easily get a short link of your WordPress blog post or page. It used to be located right next to the permalink area in the post edit screen.
However if you recently started your blog, then you will not see this feature on your WordPress site because it was removed after WordPress version 4.4.
We find this feature to be quite useful for easily getting shortlinks for our blog posts that look like this:
If you want to bring back the get shortlink feature on your WordPress site, then you’re in the right place.
Let’s take a look at how to bring back the get shortlink button back in WordPress.
Adding Get Shortlink Button
This method requires you to add code to your WordPress files. If you haven’t done this before, then please take a look at our guide on how to copy and paste code in WordPress.
You will need to add the following code to your WordPress theme’s functions.php file or a site-specific plugin:
add_filter( 'get_shortlink', function( $shortlink ) {return $shortlink;} );
This code will add the shortlink filter to display the Get Shortlink button in your WordPress pages and posts.
You can click on this button to get the shortlink for your post or page.
In Conclusion
We hope this article will be useful for you. Also, we hope that it will help to you bring back the “Get Shortlink” button in WordPress.