• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Remove WP Shortlink

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Remove WP Shortlink

This topic is: resolved

Tagged: php, shortlinks, Wordpress

  • This topic has 3 replies, 2 voices, and was last updated 11 years, 9 months ago by AnitaC.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • July 28, 2014 at 1:50 pm #116131
    theKatrinaM
    Member

    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/
    July 28, 2014 at 1:58 pm #116132
    AnitaC
    Keymaster

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


    Need help with customization or troubleshooting? Reach out to me.

    July 28, 2014 at 2:01 pm #116134
    theKatrinaM
    Member

    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

    July 28, 2014 at 2:11 pm #116139
    AnitaC
    Keymaster

    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.


    Need help with customization or troubleshooting? Reach out to me.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble