{"id":236,"date":"2021-10-23T00:06:06","date_gmt":"2021-10-23T00:06:06","guid":{"rendered":"https:\/\/mumbaiwebhosting.co.in\/portal\/?p=236"},"modified":"2022-02-25T01:52:14","modified_gmt":"2022-02-25T01:52:14","slug":"methods-to-get-shortlink-button-in-wordpress","status":"publish","type":"post","link":"https:\/\/mumbaiwebhosting.co.in\/portal\/methods-to-get-shortlink-button-in-wordpress\/","title":{"rendered":"Methods to Get Shortlink Button in WordPress"},"content":{"rendered":"<p>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,now lets see\u00a0Methods to Get Shortlink Button in WordPress.<\/p>\n<p>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.<\/p>\n<p>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. now we are going to see\u00a0 how to bring back the get shortlink feature in WordPress. In this tutorial, we will share how to restore the get shortlink button in WordPress.<\/p>\n<h2>Methods to Get Shortlink Button in WordPress<\/h2>\n<p>First thing you need to do is install and activate the\u00a0WP Bitly\u00a0plugin<\/p>\n<p>Upon activation, this plugin will automatically add the\u00a0<strong>Get Shortlink<\/strong>\u00a0button on your post edit screen.<\/p>\n<p>&nbsp;<\/p>\n<p>Once you click on this button, it will show you the shortlink for your WordPress posts and pages. This shortlink can be shared in your emails and messages, so your audience can reach directly to the page.<\/p>\n<p>&nbsp;<\/p>\n<p>You can also use the WP Bitly plugin to create custom branded shortlinks for your blog posts .<\/p>\n<h4>\u00a0Manually Adding Get Shortlink Button<\/h4>\n<p>This method requires you to add code to your WordPress files.<\/p>\n<p>You will need to add the following code to your WordPress theme\u2019s\u00a0functions.php file\u00a0or a\u00a0site-specific plugin:<\/p>\n<div>\n<div id=\"highlighter_154680\" class=\"syntaxhighlighter php\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"php plain\">add_filter( <\/code><code class=\"php string\">'get_shortlink'<\/code><code class=\"php plain\">, <\/code><code class=\"php keyword\">function<\/code><code class=\"php plain\">( <\/code><code class=\"php variable\">$shortlink<\/code> <code class=\"php plain\">) {<\/code><code class=\"php keyword\">return<\/code> <code class=\"php variable\">$shortlink<\/code><code class=\"php plain\">;} );<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>This code will add the shortlink filter to display the\u00a0<strong>Get Shortlink<\/strong>\u00a0button in your WordPress pages and posts.<\/p>\n<p>&nbsp;<\/p>\n<p>We hope this article helped you bring back the Get Shortlink button in WordPress.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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,now lets see\u00a0Methods to Get Shortlink Button&#8230; <a class=\"read-more-link\" href=\"https:\/\/mumbaiwebhosting.co.in\/portal\/methods-to-get-shortlink-button-in-wordpress\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/posts\/236"}],"collection":[{"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/comments?post=236"}],"version-history":[{"count":1,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/posts\/236\/revisions"}],"predecessor-version":[{"id":237,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/posts\/236\/revisions\/237"}],"wp:attachment":[{"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/media?parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/categories?post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mumbaiwebhosting.co.in\/portal\/wp-json\/wp\/v2\/tags?post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}