Title: Remove pingback link from header?
Last modified: August 21, 2016

---

# Remove pingback link from header?

 *  Resolved [Ate Up With Motor](https://wordpress.org/support/users/ate-up-with-motor/)
 * (@ate-up-with-motor)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/remove-pingback-link-from-header/)
 * I don’t need or want either remote publishing or pingbacks — I’m concerned about
   spam — so I’ve removed the xmlrpc.php file. However, the pingback links still
   appears in the site header and I want to remove it.
 * I tried inserting this code into my child theme’s functions.php file:
 *     ```
       function remove_x_pingback($headers) {
           unset($headers['X-Pingback']);
           return $headers;
       }
       add_filter('wp_headers', 'remove_x_pingback');
       ```
   
 * …but that didn’t do it.
 * How can I get rid of the header link without hacking up the theme’s header.php
   file to delete it?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/remove-pingback-link-from-header/#post-4218426)
 * Go to Admin – Settings – Discussion
 * Uncheck this: Allow link notifications from other blogs (pingbacks and trackbacks.)
 *  Thread Starter [Ate Up With Motor](https://wordpress.org/support/users/ate-up-with-motor/)
 * (@ate-up-with-motor)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/remove-pingback-link-from-header/#post-4218428)
 * That was the first thing I did, but the link is still in the header. It’s being
   called by the parent theme’s header.php file.
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/remove-pingback-link-from-header/#post-4218429)
 * What theme are you using?
 *  Thread Starter [Ate Up With Motor](https://wordpress.org/support/users/ate-up-with-motor/)
 * (@ate-up-with-motor)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/remove-pingback-link-from-header/#post-4218430)
 * A child theme based on Frontier.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/remove-pingback-link-from-header/#post-4218442)
 * You could filter ‘bloginfo’ and change any ‘pingback_url’ values to a 403 page
   or something, but the meta link will still be there. The only way to get rid 
   of that is copy headers.php to your child theme and actually remove the meta 
   link from the template.
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/remove-pingback-link-from-header/#post-4218445)
 * > A child theme based on Frontier
 * Do you have header.php in your child theme? yes? Try removing the link in there.
 *  Thread Starter [Ate Up With Motor](https://wordpress.org/support/users/ate-up-with-motor/)
 * (@ate-up-with-motor)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/remove-pingback-link-from-header/#post-4218463)
 * I talked to the theme developer, who offered this:
 *     ```
       function remove_pingback_url( $output, $show ) {
           if ( $show == 'pingback_url' ) $output = '';
           return $output;
       }
       add_filter( 'bloginfo_url', 'remove_pingback_url', 10, 2 );
       ```
   
 * This doesn’t remove the link, but clears the URL from the href, so it appears
   as
 * `<link rel="pingpack" href="">`
 * That’s probably close enough.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Remove pingback link from header?’ is closed to new replies.

## Tags

 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [pingback](https://wordpress.org/support/topic-tag/pingback/)
 * [xmlrpc](https://wordpress.org/support/topic-tag/xmlrpc/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 7 replies
 * 3 participants
 * Last reply from: [Ate Up With Motor](https://wordpress.org/support/users/ate-up-with-motor/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/remove-pingback-link-from-header/#post-4218463)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
