WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to remove the short link header tag from a specific page. Please suggest me a filter guys. I want to remove the entire

<link rel='shortlink'... 

section from a specific page. Adding a filter to the wp_shortlink_wp_head will work fine? I am not sure whether i can add filter to the function just like that...

Thank you

share|improve this question
There is not enough information to answer this question. Sounds theme specific though. – s_ha_dum Jan 27 '13 at 15:27

Replace 2 for ID of your page. Insert into your functions.php

if ( is_page(2) ){
   remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
share|improve this answer

Talk about resurrecting an old question....

I had to do this recently with WordPress 4.5.3 and it didn't work at all. To make it work, I needed to wrap up the if statement in a function called by wp_head - like so:

function remove_shortlink() {
    if( is_page(2) ) {
        remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
add_action( 'wp_head', 'remove_shortlink', 1 );

Replace '2' with the ID of your page. Add this to your theme's functions.php or in a plugin

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.