<?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; Read More</title>
	<atom:link href="http://wordpress-hacks.com/tag/read-more/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>Agregarle Nofollow al &#8220;leer mas&#8221; o &#8220;read more&#8221;</title>
		<link>http://wordpress-hacks.com/agregarle-nofollow-al-leer-mas-o-read-more.php</link>
		<comments>http://wordpress-hacks.com/agregarle-nofollow-al-leer-mas-o-read-more.php#comments</comments>
		<pubDate>Thu, 04 Jun 2009 00:10:48 +0000</pubDate>
		<dc:creator>Neri Aispuro</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Leer Mas]]></category>
		<category><![CDATA[Nofollow]]></category>
		<category><![CDATA[Read More]]></category>

		<guid isPermaLink="false">http://wordpress-hacks.com/?p=330</guid>
		<description><![CDATA[El leer más se usa para "cortar" el artículo, generalmente para que no aparesca el post entero en el feed y así obligar motivar al lector a entrar al sitio. A mí no me gusta y no lo uso, solo lo uso en casos de ser posts largos con muchas imagenes para no recargar la home del sitio, o en el caso de este blog, antes de poner código por que si no sale mal en la home. Volviendo al tema del leer más, no sirve para nada que el enlace a leer el artículo completo sea válido, ya que [...]]]></description>
			<content:encoded><![CDATA[<p>El leer más se usa para "cortar" el artículo, generalmente para que no aparesca el post entero en el feed y así <del datetime="2009-06-03T23:45:42+00:00">obligar</del> motivar al lector a entrar al sitio.</p>
<p>A mí <strong>no me gusta</strong> y no lo uso, solo lo uso en casos de ser posts largos con muchas imagenes para no recargar la home del sitio, o en el caso de este blog, antes de poner código por que si no sale mal en la home.</p>
<p>Volviendo al tema del leer más, no sirve para nada que el enlace a leer el artículo completo sea válido, ya que lleva a algo así como http://dominio.tld/url-del-post/#more-número de id del post.</p>
<p>Acá se me ocurren dos cosas para hacer, una como dije es, <strong>agregarle nofollow</strong>, y otra, <strong>cambiar el "leer mas" por el título del artículo</strong> y el permalink del mismo y así generar un enlace con el anchor text del título.Cada uno tendrá sus preferencias sobre que hacer.</p>
<h4>Para agregar nofollow:</h4>
<p>1. Buscamos el archivo post-template.php que está en /wp-includes<br />
2. Vamos a la linea 221 que dice lo siguiente:</p>
<div class="igBar"><span id="lphp-5"><a href="#" onclick="javascript:showPlainTxt('php-5'); return false;">Ver texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-5">
<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:#0000FF;">$output</span> .= <span style="color:#FF0000;">' &lt;a href=&quot;'</span>. get_permalink<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">"#more-$id<span style="color:#000099; font-weight:bold;">\"</span> class=<span style="color:#000099; font-weight:bold;">\"</span>more-link<span style="color:#000099; font-weight:bold;">\"</span>&gt;$more_link_text&lt;/a&gt;"</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Lo reemplazamos por:</p>
<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showPlainTxt('php-6'); return false;">Ver texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-6">
<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:#0000FF;">$output</span> .= <span style="color:#FF0000;">' &lt;a rel=&quot;nofollow&quot; href=&quot;'</span>. get_permalink<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">"#more-$id<span style="color:#000099; font-weight:bold;">\"</span> class=<span style="color:#000099; font-weight:bold;">\"</span>more-link<span style="color:#000099; font-weight:bold;">\"</span>&gt;$more_link_text&lt;/a&gt;"</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>Para que, en vez de mostrar un leer mas con nofollow, agregue el título del post con su permalink correspondiente:</h4>
<p>1. Buscamos el archivo post-template.php que está en /wp-includes<br />
2. Vamos a la linea 221, al igual que antes y reemplazamos lo siguiente:</p>
<div class="igBar"><span id="lphp-7"><a href="#" onclick="javascript:showPlainTxt('php-7'); return false;">Ver texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-7">
<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:#0000FF;">$output</span> .= <span style="color:#FF0000;">' &lt;a href=&quot;'</span>. get_permalink<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">"#more-$id<span style="color:#000099; font-weight:bold;">\"</span> class=<span style="color:#000099; font-weight:bold;">\"</span>more-link<span style="color:#000099; font-weight:bold;">\"</span>&gt;$more_link_text&lt;/a&gt;"</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Por esto:</p>
<div class="igBar"><span id="lphp-8"><a href="#" onclick="javascript:showPlainTxt('php-8'); return false;">Ver texto plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<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:#0000FF;">$output</span> .= <span style="color:#FF0000;">' &lt;a href=&quot;'</span>. get_permalink<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\"</span> class=<span style="color:#000099; font-weight:bold;">\"</span>more-link<span style="color:#000099; font-weight:bold;">\"</span>&gt;$more_link_text&lt;/a&gt;"</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Creo que está de más <del datetime="2009-06-03T23:54:19+00:00">decir</del> escribir que hagan un backup del archivito antes de modificarlo.</p>
<p>Cualquier cosa avisan en los comentarios y vemos como solucionamos <img src='http://wordpress-hacks.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://wordpress-hacks.com/agregarle-nofollow-al-leer-mas-o-read-more.php/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

