• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

How To Enable Shortlinks In WordPress

By default, the Get Shortlinks button next to your permalink URL on the Edit Post/Page screen is hidden.

get_shortlink WordPress

You can enable it by adding this PHP code to the end of your child themes functions file or better still, a must use plugin.

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

Another option if its already shown, is to change the domain using code like this :

add_filter( 'get_shortlink', 'change_get_shortlink' );
function change_get_shortlink( $shortlink ) {
    return str_replace( 'example.com', 'wpsites.net', $shortlink );
}

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.