Remove WP Shortlink

Community Forums Forums Design Tips and Tricks Remove WP Shortlink

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  Anita 1 month, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #116131

    theKatrinaM
    Participant
    Post count: 16

    For some odd reason wp.me is redirecting back to an old domain that was changed 5 months ago and is expired. I checked in my database on myPHPadmin and wp-config and they both have the current url. So I used this code to remove it but nothing happens.

    remove_action( ‘wp_head’, ‘wp_shortlink_wp_head’);

    I did some more googling and found this code

    remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 ); // removing the default shortlink
    add_action( 'wp_head', 'bilty_shortlink_head'); // adding the new bit.ly shortlink
     
    function bilty_shortlink_head() {
    	global $post;
    	$shortURL = get_post_meta($post->ID, 'bitlyURL', true);
    	if(!empty($shortURL)) {
    		echo '<link rel="shortlink" href="'.$shortURL.'" />'."\n";
    	} else {
    		echo '<link rel="shortlink" href="'.get_bloginfo('url').'?p='.$post->ID.'" />'."\n";
    	}
    }

    still the wp.me links are generating. Has anyone had success in removing wp.me shortlink?


    “People are only supposed to believe the legends not understand them.” Norman Collins
    Design | Blog

    http://kakersinwonderland.com/
    #116132

    Anita
    Blocked
    Post count: 7712

    I see you are using Jetpack. See if the Shortlinks are enabled/activated. If so, deactivate.


    Web: http://cre8tivediva.com / Twitter: @thecre8tivediva

    #116134

    theKatrinaM
    Participant
    Post count: 16

    I swear JetPack changes so much I don’t know anything about it anymore. Thank you @Anitac, I still find it weird for it to use an old domain.


    “People are only supposed to believe the legends not understand them.” Norman Collins
    Design | Blog

    #116139

    Anita
    Blocked
    Post count: 7712

    Ohhhh you know what. If you registered the domain name under your WordPress.com account to attach Jetpack to the site – then you used the old domain. Put in a ticket to Jetpack. They can fix it for you.


    Web: http://cre8tivediva.com / Twitter: @thecre8tivediva

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.