WordPress: How to remove the Shortlink Link Element

In the latest update of WordPress, to version 3.0, I noticed one link element being added in my site’s head section. I personally prefer to see no change in the coding after updates: the coding that I am talking about is the code we see via using browser view source code option.

This element looked something like this:

<a rel="shortlink" type="text/html" href="http://www dot yoursite dot com">

This element includes a shorter version of the link to your site/blog/post. And I think it helps the users when it comes to using social bookmarking and similar types of sites.

Anyway, in order to block this element, you need to put this code:

remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0 );

In function.php file: you can find this file in your currently used theme folder:

2 Responsesto “WordPress: How to remove the Shortlink Link Element”

  1. piero oliosi says:

    I cannot open a page on wordpress because the web address is not correct (permalink?)
    thanks

  2. piero oliosi says:

    how to change adress of a page in wordpress (permalink)
    because the page is not open for not valid adress
    thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify via Email Only if someone replies to My Comment