Support » Fixing WordPress » How to Disable Auto Adding of Shortlink?

  • Hi,

    I already my very URL shortener that generates a short URL for all my posts, so I want to disable the shortlink auto creation? I don’t know where the option is…

    Anybody can help me?


Viewing 7 replies - 1 through 7 (of 7 total)
  • A part from commenting this line:

    $shortlink = get_shortlink($wp_query->get_queried_object_id());
    /*echo '<link rel="shortlink" href="' . $shortlink . '" />'; */
    echo '';

    — stats.php


    I’d really like to know how to disable this too but for a different reason: it doesn’t work properly. The service returns the internal host name of my server (and not the public domain). So for example my html folder on my server might internally be at but my domain is just

    I’m not even sure where it is getting my server name from as I never entered it anywhere in WP that I can think of.

    Some of us run our own short URL service using YOURLS. How about giving us the option to use our YOURLS short URL service rather than

    Exactly hollywookgrind, that’s my case too! And since I use YOURLS, I already have the auto adding of my short links.

    Right now I have this:

    <link rel=”alternate short shorter shorturl shortlink” href=”″ />

    Since I have commented out the stats.php code, but it will get overriden with the next update 🙁

    The fix is here 😀 Let’s wait for the repository to update now.

    It’s actually a lot simpler:

    add this to the functions.php file in your theme folder:

    remove_action('wp_head', 'shortlink_wp_head');

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to Disable Auto Adding of Shortlink?’ is closed to new replies.