Have you ever ever seen websites which have a bit enter discipline on the backside of their publish with a brief hyperlink to their article? Nicely often that shortlink is coming from the WordPress get_shortlink filter. On this article, we’ll present you ways you should utilize the get_shortlink codes to show a bit enter field in your publish. It can additionally enable your consumer to pick the shortlink on one click on which makes it simple for them to repeat and paste it.
All it’s a must to do is put this code someplace within the loop (often in single.php) file.
This can carry you a similar shortlink that you just see while you click on the Get Shortlink Button under your publish title.
By default it’s yoursite.com/?p=1082 or one thing comparable. However that may be changed with different companies by utilizing any shortlink plugin that makes use of the “get_shortlink” filter to override the shortlink correctly like WordPress.com Stats for (wp.me) or WP Bitly for (Bit.ly or Bit.ly PRO)
After you have the code added in your theme, the preview would seem like this: