<?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>WordPress Hacks &#187; Tags Descriptions</title>
	<atom:link href="http://wordpress-hacks.com/tag/tags-descriptions/feed" rel="self" type="application/rss+xml" />
	<link>http://wordpress-hacks.com</link>
	<description>Tips y consejos de WordPress en español</description>
	<lastBuildDate>Fri, 30 Mar 2012 10:59:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Agregar descripciones a categorías masivamente</title>
		<link>http://wordpress-hacks.com/agregar-descripciones-a-categorias-masivamente.php</link>
		<comments>http://wordpress-hacks.com/agregar-descripciones-a-categorias-masivamente.php#comments</comments>
		<pubDate>Wed, 22 Dec 2010 10:27:30 +0000</pubDate>
		<dc:creator>Neri Aispuro</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tags Descriptions]]></category>
		<category><![CDATA[wp_terms]]></category>
		<category><![CDATA[wp_term_taxonomy]]></category>

		<guid isPermaLink="false">http://wordpress-hacks.com/?p=656</guid>
		<description><![CDATA[Estoy desarrollando un "proyecto" con mi amigo y socio Diego, y el otro día chequeando cosas que nos faltan para terminar, nos topamos con el problema de las descripciones en las categorías, ya que vamos a trabajar con muchas categorías (unas 200 eran en ese momento) y necesitábamos hacer algo que nos ahorrara un poco de trabajo, por lo que empezamos a probar y finalmente Diego dió con el código que a continuación les paso. Para dar un ejemplo imaginemos que hoy queremos hacer lo que hace softonic con las descripciones de las categorías (o la de programas, que está [...]]]></description>
			<content:encoded><![CDATA[<p>Estoy desarrollando un "proyecto" con mi amigo y socio Diego, y el otro día chequeando cosas que nos faltan para terminar, nos topamos con el problema de las descripciones en las categorías, ya que vamos a trabajar con muchas categorías (unas 200 eran en ese momento) y necesitábamos hacer algo que nos ahorrara un poco de trabajo, por lo que empezamos a probar y finalmente Diego dió con el código que a continuación les paso.</p>
<p><img src="http://wordpress-hacks.com/wp-content/uploads/2010/12/are-you-booger.gif" alt="" title="are you booger" width="640" height="343" class="alignnone size-full wp-image-662" /></p>
<p>Para dar un ejemplo imaginemos que hoy queremos hacer lo que hace softonic con las descripciones de las categorías (o la de programas, que está aún más automatizada.), que sería agregar descripciones masivamente a las mismas.</p>
<p>La estructura para las categorías que cuenta el sitio antes mencionado es la siguiente: "Descargar programas de <strong>categoria</strong> en Softonic. Programas gratis y en español ¡Bájatelos!".<br />
Ejemplo: "Descargar programas de Antivirus en Softonic. Programas gratis y en español ¡Bájatelos!".</p>
<p>Suponiendo que queremos hacer o tenemos un sitio de software y queremos poner algo así como lo que hace softonic tenemos dos maneras de hacerlo: "Virtualmente" o "Físicamente", paso a explicar:</p>
<p>Virtualmente sería agregar la meta tag description en el theme, por ejemplo: </p>
<div class="igBar"><span id="lphp-3"><a href="#" onclick="javascript:showPlainTxt('php-3'); return false;">Ver texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-3">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;meta name=<span style="color:#FF0000;">"description"</span> content=<span style="color:#FF0000;">"Descargar programas de &lt;?php single_cat_title(); ?&gt;. Programas gratis y en español ¡Bájatelos!"</span> /&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Mientras que la manera física de hacerlo sería escribirlo en la base de datos, que es lo que vamos a hacer.</p>
<p>La diferencia de estas 2 formas está en que de la forma "virtual" estamos obligados a mostrar siempre lo mismo y cuando necesitemos cambiar la descripción de una sola categoría tenemos que agregar tags condicionales y no le veo mucho sentido, en cambio de la manera "física", cuando tengamos ganas de editar los datos de una categoría en particular simplemente vamos a <strong>/wp-admin/edit-tags.php?taxonomy=category</strong> y editamos la descripción. Fácil, ¿no?.</p>
<p>Para editar las categorías de forma "física" van a tener que entrar a la base de datos, ir a la solapa sql y hacer la siguiente consulta:<br />
(no se olviden de adaptarla a sus necesidades <img src='http://wordpress-hacks.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  )</p>
<div class="igBar"><span id="lsql-4"><a href="#" onclick="javascript:showPlainTxt('sql-4'); return false;">Ver texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-4">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_term_taxonomy <span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> wp_terms <span style="color: #993333; font-weight: bold;">ON</span> wp_term_taxonomy.term_id = wp_terms.term_id</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">SET</span> wp_term_taxonomy.description = CONCAT<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">'Descargar programas de '</span>,wp_terms.name,<span style="color: #ff0000;">'. Programas gratis y en español ¡Bájatelos!'</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">WHERE</span> wp_term_taxonomy.taxonomy = <span style="color: #ff0000;">'category'</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>"wp_terms.name" escribe el nombre de la categoría, asi que simplemente editenlo a gusto.</p>
<p>Dejo un par de capturas por si se les complica para llegar a "sql".<br />
<img src="http://wordpress-hacks.com/wp-content/uploads/2010/12/cap-1.jpg" alt="" title="cap-1" width="248" height="125" class="alignnone size-full wp-image-660" /></p>
<p><a href="http://wordpress-hacks.com/wp-content/uploads/2010/12/cap-2.jpg"><img src="http://wordpress-hacks.com/wp-content/uploads/2010/12/cap-2-300x39.jpg" alt="" title="cap-2" width="300" height="39" class="alignnone size-medium wp-image-661" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://wordpress-hacks.com/agregar-descripciones-a-categorias-masivamente.php/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Metas descripciones en tags y categorías sin plugins</title>
		<link>http://wordpress-hacks.com/metas-descriptions-en-tags-y-categorias.php</link>
		<comments>http://wordpress-hacks.com/metas-descriptions-en-tags-y-categorias.php#comments</comments>
		<pubDate>Mon, 14 Dec 2009 19:15:38 +0000</pubDate>
		<dc:creator>Neri Aispuro</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Meta Tags]]></category>
		<category><![CDATA[Tags Descriptions]]></category>

		<guid isPermaLink="false">http://wordpress-hacks.com/?p=513</guid>
		<description><![CDATA[La meta tag description es una de las más importantes a la hora de hacer seo on page en un sitio, si tenemos categorías y tags que sean relevantes seguro podrán aprovechar este artículo. Desconozco si algún plugin para optimización seo tiene implementado las descripciones en las tags, ya que desde la versión 2.8 de WordPress se pueden agregar, pero probablemente si. Ayer estuve gran parte de la tarde buscando el mejor código para hacer esto y me decidí por el siguiente: Para llamar las descripciones en tags: Ver texto plano PHP: &#60;?php if &#40; is_tag&#40;&#41;&#41; : ?&#62; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>La <a href="http://www.google.com/support/webmasters/bin/answer.py?hl=es&amp;answer=79812">meta tag description</a> es una de las más importantes a la hora de hacer <a href="http://blog.ikhuerta.com/bases-del-seo-onpage">seo on page</a> en un sitio, si tenemos categorías y tags que sean relevantes seguro podrán aprovechar este artículo.</p>
<div align="center"><img src="http://wordpress-hacks.com/wp-content/uploads/2009/12/meta_tags-300x242.jpg" alt="meta tags" title="meta tags" width="300" height="242" class="aligncenter size-medium wp-image-515" /></div>
<p>Desconozco si algún plugin para optimización seo tiene implementado las descripciones en las tags, ya que desde la <a href="http://wordpress-hacks.com/tags-descriptions-en-wordpress-28.php">versión 2.8 de WordPress</a> se pueden agregar, pero probablemente si.</p>
<p>Ayer estuve gran parte de la tarde buscando el mejor código para hacer esto y me decidí por el siguiente:</p>
<p>Para llamar las descripciones en tags:</p>
<div class="igBar"><span id="lphp-9"><a href="#" onclick="javascript:showPlainTxt('php-9'); return false;">Ver texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-9">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><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_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> : <span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;meta name=<span style="color:#FF0000;">"description"</span> content=<span style="color:#FF0000;">"&lt;?php echo tag_description() ?&gt;"</span> /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#616100;">endif</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>en categorías:</p>
<div class="igBar"><span id="lphp-10"><a href="#" onclick="javascript:showPlainTxt('php-10'); return false;">Ver texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-10">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><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_category<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:#000000; font-weight:bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;meta name=<span style="color:#FF0000;">"description"</span> content=<span style="color:#FF0000;">"&lt;?php echo category_description() ?&gt;"</span> /&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#616100;">endif</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Este código obviamente va en el header antes de /head.</p>
<p>El problema que tenía era que me quedaban las descripciones con un &lt;p&gt; y &lt;/p&gt; , por ejemplo quedaba:</p>
<div class="igBar"><span id="lphp-11"><a href="#" onclick="javascript:showPlainTxt('php-11'); return false;">Ver texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-11">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;meta name=<span style="color:#FF0000;">"description"</span> content=<span style="color:#FF0000;">"&lt;p&gt;descripcion&lt;/p&gt;"</span> /&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Anduve buscando por un rato y encontré algo que realmente desconocía, la <a href="http://codex.wordpress.org/Function_Reference/wpautop">función wpautop</a>, fuí al <a href="http://ma.tt/scripts/autop/">blog de Matt</a> y entendí un poco más.</p>
<p>Al rato encontré en el foro de Wp <a href="http://wordpress.org/support/topic/137008#post-625941">la solución</a> a mi problema.</p>
<p>Hay que agregar la siguiente línea en el <strong>functions.php</strong> del theme en uso:</p>
<div class="igBar"><span id="lphp-12"><a href="#" onclick="javascript:showPlainTxt('php-12'); return false;">Ver texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-12">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">remove_filter<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'term_description'</span>,<span style="color:#FF0000;">'wpautop'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Para los desprevenidos que se pregunten donde agregar las descripciones a los tags y las categorías les respondo que se hacen entrando a la lista de tags o categorías y dándo clic en editar -no en edición rápida- y agregando en el campo descripción lo que queramos mostrar.</p>
<p><em>Nota:</em> si usan algún "plugin seo" chequeen que no les quede duplicada la descripción, la mayoría de los plugins seo que conozco solo agregan la meta tag description a las categorías y no a los tags, si es su caso pueden agregar solo el código para las descripciones de los tags.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpress-hacks.com/metas-descriptions-en-tags-y-categorias.php/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Tags Descriptions en WordPress 2.8</title>
		<link>http://wordpress-hacks.com/tags-descriptions-en-wordpress-28.php</link>
		<comments>http://wordpress-hacks.com/tags-descriptions-en-wordpress-28.php#comments</comments>
		<pubDate>Fri, 08 May 2009 11:59:04 +0000</pubDate>
		<dc:creator>Neri Aispuro</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Tags Descriptions]]></category>
		<category><![CDATA[WordPress 28]]></category>

		<guid isPermaLink="false">http://wordpress-hacks.com/?p=210</guid>
		<description><![CDATA[No suelo comentar noticias ni nada por el estilo porque no me gustan y me resulta cansador leer títulos como "WordPress bla bla traerá bla bla cosa", pero esta noticia para mí no es una más, sino que algo que estuve esperando -y que se me ocurrió- hace mucho, se trata de las descripciones en las Tags por defecto en Wp, algo como lo que Wp viene haciendo ya hace mucho con las categorías, eso es muy importante para el Seo en WordPress, y mucho mas interesante resulta viniendo de las tags. Se puede ver "un avance" en el Codex. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-212 aligncenter" title="WordPress" src="http://wordpress-hacks.com/wp-content/uploads/2009/05/wp1.jpg" alt="WordPress" width="490" height="200" /></p>
<p>No suelo comentar noticias ni nada por el estilo porque <strong>no me gustan</strong> y me resulta cansador leer títulos como "WordPress bla bla traerá bla bla cosa", pero esta noticia para mí no es una más, sino que algo que estuve esperando -y que se me ocurrió- hace mucho, se trata de las <strong>descripciones en las Tags</strong> por defecto en Wp, algo como lo que Wp viene haciendo ya hace mucho con las categorías, eso es muy importante para el <a title="WordPress SEO" href="http://wordpress-hacks.com/?s=Seo+en+WordPress">Seo en WordPress</a>, y mucho mas interesante resulta viniendo de las tags.<br />
Se puede ver "un avance" <a href="http://codex.wordpress.org/Template_Tags/tag_description">en el Codex</a>.</p>
<p>Vía - <a href="http://justintadlock.com/archives/2009/04/30/tag-descriptions-in-wordpress-28">El blog de Justin</a><br />
¿Opiniones?</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpress-hacks.com/tags-descriptions-en-wordpress-28.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

