Desde a versão 2.5 que o WordPress implementa uma série de caracteristicas na secção <head> dos blogs com base na função wp_head. Na realidade muitos blogs não necessitam da maioria dessas funções / informação que é implementada.
Para quem não precisa dessas funções e quer limpar um pouco a secção <head> do blog pode remover algumas dessas funções utilizando a função remove_action.
Função remove_action();
A função remove_action() é utilizada para remover uma determinada função anexada a uma acção.
A sua utilização é bastante simples e permite alguma flexibilidade, contudo neste tutorial apenas irei abordar a forma de remover as funções necessárias para o efeito do tutorial.
remove_action( $tag, $function_to_add, $priority, $accepted_args );
This function removes a function attached to a specified action hook. This method can be used to remove default functions attached to a specific action hook and possibly replace them with a substitute. See also remove_filter(), add_action() and add_filter().
Important: To remove a hook, the $function_to_remove and $priority arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.
via WordPress codex
O código que se segue pode ser encontrado na secção referende ao gancho wp_head que se encontra no ficheiro default-filters.php dentro da pasta wp-includes:
<p><link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://muiomuio.net/feed/" /><br /> <link rel="alternate" type="text/xml" title="RSS .92" href="http://muiomuio.net/feed/rss/" /><br /> <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="http://muiomuio.net/feed/atom/" /><br /> <link rel="pingback" href="http://muiomuio.net/xmlrpc.php" /></p> <p> <link rel='archives' title='August 2009' href='http://muiomuio.net/2009/08/' /><br /> <link rel='archives' title='July 2009' href='http://muiomuio.net/2009/07/' /></p> <p> <link rel='archives' title='June 2009' href='http://muiomuio.net/2009/06/' /><br /> <link rel='archives' title='May 2009' href='http://muiomuio.net/2009/05/' /><br /> <link rel='archives' title='April 2009' href='http://muiomuio.net/2009/04/' /><br /> <link rel='archives' title='March 2009' href='http://muiomuio.net/2009/03/' /><br /> <link rel='archives' title='February 2009' href='http://muiomuio.net/2009/02/' /><br /> <link rel='archives' title='January 2009' href='http://muiomuio.net/2009/01/' /><br /> <link rel='archives' title='December 2008' href='http://muiomuio.net/2008/12/' /><br /> <link rel='archives' title='November 2008' href='http://muiomuio.net/2008/11/' /><br /> <link rel='archives' title='October 2008' href='http://muiomuio.net/2008/10/' /></p> <p> <link rel='archives' title='September 2008' href='http://muiomuio.net/2008/09/' /><br /> <link rel='archives' title='August 2008' href='http://muiomuio.net/2008/08/' /><br /> <link rel='archives' title='July 2008' href='http://muiomuio.net/2008/07/' /><br /> <link rel='archives' title='June 2008' href='http://muiomuio.net/2008/06/' /><br /> <link rel='archives' title='May 2008' href='http://muiomuio.net/2008/05/' /><br /> <link rel='archives' title='April 2008' href='http://muiomuio.net/2008/04/' /><br /> <link rel='archives' title='March 2008' href='http://muiomuio.net/2008/03/' /><br /> <link rel='archives' title='February 2008' href='http://muiomuio.net/2008/02/' /><br /> <link rel='archives' title='January 2008' href='http://muiomuio.net/2008/01/' /></p> <p> <link rel='archives' title='December 2007' href='http://muiomuio.net/2007/12/' /><br /> <link rel='archives' title='November 2007' href='http://muiomuio.net/2007/11/' /><br /> <link rel='archives' title='October 2007' href='http://muiomuio.net/2007/10/' /><br /> <link rel='archives' title='September 2007' href='http://muiomuio.net/2007/09/' /><br /> <link rel='archives' title='August 2007' href='http://muiomuio.net/2007/08/' /><br /> <link rel='archives' title='July 2007' href='http://muiomuio.net/2007/07/' /><br /> <link rel='archives' title='June 2007' href='http://muiomuio.net/2007/06/' /><br /> <link rel='archives' title='May 2007' href='http://muiomuio.net/2007/05/' /><br /> <link rel='archives' title='April 2007' href='http://muiomuio.net/2007/04/' /></p> <p> <link rel='archives' title='March 2007' href='http://muiomuio.net/2007/03/' /><br /> <link rel='archives' title='February 2007' href='http://muiomuio.net/2007/02/' /><br /> <link rel='archives' title='January 2007' href='http://muiomuio.net/2007/01/' /><br /> <link rel='archives' title='December 2006' href='http://muiomuio.net/2006/12/' /><br /> <link rel='archives' title='November 2006' href='http://muiomuio.net/2006/11/' /><br /> <link rel='archives' title='October 2006' href='http://muiomuio.net/2006/10/' /></p>
Tendo em conta que o WordPress não é apenas utilizado em blogs a maioria destas funções podem ser removidas pois são desnecessárias, contudo recomendo cuidado pois a remoção destas funções pode originar o mau funcionamento do blog sem qualquer aviso ou notificação.
O código que se segue é um exemplo de como utilizar a função remove_action() e não uma recomendação do que se deve fazer. Aconselho o leitor a testar antes de implementar para garantir o bom funcionamento do seu blog. Estes códigos removem algumas linhas de código dos templates e permitem, consequentemente, que a página carregue mais rapidamente. Devem ser incluídos no ficheiro functions.php:
remove_action( 'wp_head', 'feed_links_extra', 3 ); // Mostrar links para feeds extra como feeds de categoria, tags, etc remove_action( 'wp_head', 'feed_links', 2 ); // Mostrar links para as feeds de posts e comentários remove_action( 'wp_head', 'rsd_link' ); // Remove o link para o serviço de RSD, EditURI remove_action( 'wp_head', 'wlwmanifest_link' ); // Remove o link do ficheiro de manifesto do Windows Live Writer remove_action( 'wp_head', 'index_rel_link' ); // Remove o link de index (<link rel='index' title='MUIOMUIO.NET' href='http://muiomuio.net' />) remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // Remove o rel=prev link remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // remove o rel=start link remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // Remove os links para posts relacionados adjacentes ao post actualDisplay relational links for the posts adjacent to the current post. remove_action( 'wp_head', 'wp_generator' ); // Remove o WP version e Content Generator da secção head (<meta name="generator" content="WordPress 2.8.2" />) remove_action( 'wp_head', 'wp_get_archives' ); // remove a lista de links para as páginas de arquivos
Relembro que estes códigos são apenas a titulo de exemplo e que antes de remover qualquer uma destas funções que deves testar para garantir o bom funcionamento do blog.
Para mais informação sobre a função remove_action visita a página no WordPress Codex:
http://codex.wordpress.org/Function_Reference/remove_action


coloquei um tema novo e ele vem com a função no header. Ai, pra lascar tudo, de “fábrica” vem a seguinte meta:
Seria ótimo se eu não quisesse que meu blog não fosse indexado, mas eu quero utilizar o platinum Seo e dará conflito pq ele também insere a mesma meta name.
Como que eu faço pra retirar isso ai?
Eu até retirei do codigo o mas as tags inseridas pelo platinum não aparecem de jeito nenhum. Se tivesse como inserir esse plugin manualmente no header até seria bom, pq eu deixava sem esse
…Seria interessante um post falando
Nota: enviei novamente pq o primeiro coment foi sem os codigos
O código que colocaste no comentário não aparece. É necessário ter cuidado pois os comentários permitem HTML ao colocares uma tag html ela não aparece, altera a forma como colocas o código de forma a que fique visível para eu e outros leitores tentarmos perceber o que está de errado.