Jump to content


Photo

How to remove profile, generator and pingback from the head?


  • Please log in to reply
3 replies to this topic

#1 kadampa

kadampa

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 26 February 2011 - 11:14 AM

I would like to remove the following tags from the head...

 <link rel="profile" href="http://gmpg.org/xfn/11" />
	<meta name="generator" content="WordPress 3.1" />
	<link rel="pingback" href="http://manjushri.dev/xmlrpc.php" />

I would expect the following in functions.php to work for the first two but it doesn't.

 remove_action( 'wp_head',             'wlwmanifest_link'                     );
	remove_action( 'wp_head',             'wp_generator'                         );

Any chance of a fix for this?

Thanks.

#2 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 26 February 2011 - 11:45 AM

It might be too late to make changes for 1.3, I have to go out as its the partners birthday, so I cant do it right now! Andrew might be able to add a filter.

#3 kadampa

kadampa

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 27 February 2011 - 10:03 AM

That would be great is he could.

#4 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 27 February 2011 - 11:54 AM

OK I have made the changes, it will be in 1.3 :) I added a new filter to remove the xfn link too, so to remove all you could add the following to your childs functions.php `remove_action( 'wp_head', 'wlwmanifest_link' );` `remove_action( 'wp_head', 'wp_generator' );` `remove_action('wp_head', 'rsd_link');` `add_filter( 'pagelines_xfn', '__return_true' );`