<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PHPBSD.net &#187; title-tags</title>
	<atom:link href="http://www.phpbsd.net/tag/title-tags/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpbsd.net</link>
	<description>Blogueando sobre PHP, BSD, SEO, AJAX, Seguridad, Rendimiento... y mucho más</description>
	<lastBuildDate>Thu, 07 Oct 2010 11:57:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Títulos un poco más SEO y en español para WordPress</title>
		<link>http://www.phpbsd.net/2007/10/09/titulos-un-poco-mas-seo-y-en-espanol-para-wordpress/</link>
		<comments>http://www.phpbsd.net/2007/10/09/titulos-un-poco-mas-seo-y-en-espanol-para-wordpress/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 14:41:23 +0000</pubDate>
		<dc:creator>Oriol</dc:creator>
				<category><![CDATA[Artículos]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programación]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[title-tags]]></category>
		<category><![CDATA[webmaster]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.phpbsd.net/2007/10/09/titulos-un-poco-mas-seo-y-en-espanol-para-wordpress/</guid>
		<description><![CDATA[Los títulos de las páginas son uno de los factores más importantes de cara a la optimización de un sitio web para los buscadores (SEO). Si tenemos un blog con WordPress la responsabilidad de tener unos buenos títulos recae en el archivo header.php de nuestro tema. El tema por defecto de WordPress (Kubrick), y la [...]


Entradas relacionadas:<ul><li><a href='http://www.phpbsd.net/2007/06/07/internacionalizacion-de-temas-en-wordpress-usando-gettext/' rel='bookmark' title='Permanent Link: Internacionalización de temas en WordPress usando gettext'>Internacionalización de temas en WordPress usando gettext</a></li><li><a href='http://www.phpbsd.net/2006/09/11/falta-poco-para-la-international-php-conference-2006/' rel='bookmark' title='Permanent Link: Falta poco para la International PHP Conference 2006'>Falta poco para la International PHP Conference 2006</a></li><li><a href='http://www.phpbsd.net/2006/10/31/un-poco-de-musica-para-freebsd/' rel='bookmark' title='Permanent Link: Un poco de música para FreeBSD'>Un poco de música para FreeBSD</a></li></ul>]]></description>
			<content:encoded><![CDATA[<p>Los <strong>títulos de las páginas</strong> son uno de los factores más importantes de cara a la <strong>optimización de un sitio web para los buscadores</strong> (<a href="http://www.phpbsd.net/tag/seo/" title="Archivo de etiquetas de seo en PHPBSD.net">SEO</a>). Si tenemos un blog con WordPress la responsabilidad de tener unos buenos títulos recae en el archivo <em>header.php</em> de nuestro tema. El tema por defecto de WordPress (Kubrick), y la mayoría de themes que corren por ahí, generan unos títulos no muy buenos para el posicionamiento, a continuación describo una manera fácil de solucionar esto sin necesidad de ningún plugin.</p>
<p>Se trata de sustituir el código para los <strong>Title Tags</strong> que normalmente será algo parecido a esto:</p>
<div class="syntax_hilite">
<div id="php-4">
<div class="php">&lt;title&gt;&lt;?php bloginfo<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'name'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span> <span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> is_single<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#000000; font-weight:bold;">?&gt;</span> &amp;raquo; Blog Archive <span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#000000; font-weight:bold;">?&gt;</span> <span style="color:#000000; font-weight:bold;">&lt;?php</span> wp_title<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; ?&gt;&lt;/title&gt;</div>
</div>
</div>
<p></p>
<p>por esto si tenemos WordPress 2.3:</p>
<div class="syntax_hilite">
<div id="php-5">
<div class="php">&lt;title&gt;&lt;?php<br />
<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>is_archive<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'Archivo de '</span>;<br />
<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>is_tag<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'etiquetas de '</span>;<br />
<a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>wp_title<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">''</span>,<span style="color:#000000; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;<br />
<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>is_search<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'Resultados de b&amp;uacute;squeda de '</span>.<span style="color:#0000FF;">$s</span>;<br />
<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> !<span style="color:#006600; font-weight:bold;">&#40;</span>is_404<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> and <span style="color:#006600; font-weight:bold;">&#40;</span>is_search<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> or <span style="color:#006600; font-weight:bold;">&#40;</span>is_single<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> or <span style="color:#006600; font-weight:bold;">&#40;</span>is_page<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> or <span style="color:#006600; font-weight:bold;">&#40;</span>is_tag<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> or <span style="color:#006600; font-weight:bold;">&#40;</span>is_archive<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">' en '</span>;<br />
bloginfo<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'name'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;<br />
<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> is_home<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">' &amp;raquo; '</span>; bloginfo<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'description'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
?&gt;&lt;/title&gt;</div>
</div>
</div>
<p></p>
<p>o por esto si tenemos versiones anteriores:</p>
<div class="syntax_hilite">
<div id="php-6">
<div class="php">&lt;title&gt;&lt;?php<br />
<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>is_archive<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'Archivo de '</span>;<br />
<a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>wp_title<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">''</span>,<span style="color:#000000; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;<br />
<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color:#000066;">function_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'is_tag'</span><span style="color:#006600; font-weight:bold;">&#41;</span> and is_tag<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'Archivo de etiquetas de '</span>.<span style="color:#0000FF;">$tag</span>;<br />
<span style="color:#616100;">elseif</span> <span style="color:#006600; font-weight:bold;">&#40;</span>is_search<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'Resultados de b&amp;uacute;squeda de '</span>.<span style="color:#0000FF;">$s</span>;<br />
<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> !<span style="color:#006600; font-weight:bold;">&#40;</span>is_404<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> and <span style="color:#006600; font-weight:bold;">&#40;</span>is_search<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> or <span style="color:#006600; font-weight:bold;">&#40;</span>is_single<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> or <span style="color:#006600; font-weight:bold;">&#40;</span>is_page<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> or <span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color:#000066;">function_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'is_tag'</span><span style="color:#006600; font-weight:bold;">&#41;</span> and is_tag<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> or <span style="color:#006600; font-weight:bold;">&#40;</span>is_archive<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">' en '</span>;<br />
bloginfo<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'name'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;<br />
<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> is_home<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">' &amp;raquo; '</span>; bloginfo<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'description'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
?&gt;&lt;/title&gt;</div>
</div>
</div>
<p></p>
<p>Con esta modificación conseguimos los siguientes tipos de títulos:</p>
<ul>
<li>En la home: "<em>NOMBRE_DEL_BLOG</em> &raquo; <em>DESCRIPCIÓN_DEL_BLOG</em>"</li>
<li>En las categorías: "Archivo de <em>NOMBRE_CATEGORÍA</em> en <em>NOMBRE_DEL_BLOG</em>"</li>
<li>En las etiquetas: "Archivo de etiquetas de <em>NOMBRE_ETIQUETA</em> en <em>NOMBRE_DEL_BLOG</em>"</li>
<li>En los resultados de búsqueda: "Resultados de búsqueda de <em>TEXTO_BUSCADO</em> en <em>NOMBRE_DEL_BLOG</em>"</li>
<li>Para todos los posts y páginas: "<em>TÍTULO_ENTRADA</em> en <em>NOMBRE_DEL_BLOG</em>"</li>
</ul>
<p>Lo anterior está extraido del tema <a target="_blank" href="http://getk2.com/" title="K2">K2</a>, traducido al español y con algún retoque. Podría haber hecho un plugin, pero es tan sencillo y como igualmente sería necesario modificar el tema para llamar al plugin, que mira, modificas el tema y directamente introduces el código de lo que sería el plugin.</p>
<p>Si quieres tomarte más en serio la generación de los títulos o si eres perezoso existen plugins muy avanzados como <a target="_blank" href="http://www.netconcepts.com/seo-title-tag-plugin/" title="SEO Title Tag: A WordPress Plugin for SEO (Search Engine Optimization)">SEO Title Tag</a> y <a target="_blank" href="http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/" title="SEO for your Wordpress Blog">All in One SEO Pack</a>, este último también sirve para gestionar los <strong>Meta Tags</strong> "description" y "keywords" también muy importantes para SEO pero no tanto como los <strong>Title Tags</strong>.</p>


<p>Entradas relacionadas:<ul><li><a href='http://www.phpbsd.net/2007/06/07/internacionalizacion-de-temas-en-wordpress-usando-gettext/' rel='bookmark' title='Permanent Link: Internacionalización de temas en WordPress usando gettext'>Internacionalización de temas en WordPress usando gettext</a></li><li><a href='http://www.phpbsd.net/2006/09/11/falta-poco-para-la-international-php-conference-2006/' rel='bookmark' title='Permanent Link: Falta poco para la International PHP Conference 2006'>Falta poco para la International PHP Conference 2006</a></li><li><a href='http://www.phpbsd.net/2006/10/31/un-poco-de-musica-para-freebsd/' rel='bookmark' title='Permanent Link: Un poco de música para FreeBSD'>Un poco de música para FreeBSD</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpbsd.net/2007/10/09/titulos-un-poco-mas-seo-y-en-espanol-para-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

