WordPress.org

Ready to get started?Download WordPress

Forums

How to Disable Auto Adding of wp.me Shortlink? (8 posts)

  1. Alexandre
    Member
    Posted 4 years ago #

    Hi,

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

    Anybody can help me?

    Thanks!

  2. Alexandre
    Member
    Posted 4 years ago #

    A part from commenting this line:

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

    -- stats.php

    :D

  3. norrismp
    Member
    Posted 4 years ago #

    I'd really like to know how to disable this too but for a different reason: it doesn't work properly. The Wp.me 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 server.net/~mydomain/ but my domain is just mydomain.com.

    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.

  4. hollywoodgrind
    Member
    Posted 4 years ago #

    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 wp.me?

  5. Alexandre
    Member
    Posted 4 years ago #

    Exactly hollywookgrind, that's my case too! And since I use YOURLS, I already have the auto adding of my http://bdgk.in short links.

    Right now I have this:

    <link rel="alternate short shorter shorturl shortlink" href="http://bdgk.in/i1" />

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

  6. hollywoodgrind
    Member
    Posted 4 years ago #

  7. Alexandre
    Member
    Posted 4 years ago #

    The fix is here :D Let's wait for the repository to update now.

  8. ncmason
    Member
    Posted 4 years ago #

    It's actually a lot simpler:

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

    remove_action('wp_head', 'shortlink_wp_head');

Topic Closed

This topic has been closed to new replies.

About this Topic