<?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; Leer Mas</title> <atom:link href="http://wordpress-hacks.com/tag/leer-mas/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, 23 Jul 2010 11:36:18 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</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 &#8220;cortar&#8221; 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 [...]]]></description> <content:encoded><![CDATA[<p>El leer más se usa para &#8220;cortar&#8221; 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 &#8220;leer mas&#8221; 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="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' &lt;a href=&quot;'</span><span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;#more-<span style="color: #006699; font-weight: bold;">$id</span><span style="color: #000099; font-weight: bold;">\&quot;</span> class=<span style="color: #000099; font-weight: bold;">\&quot;</span>more-link<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$more_link_text</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span></pre></div></div><p>Lo reemplazamos por:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' &lt;a rel=&quot;nofollow&quot; href=&quot;'</span><span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;#more-<span style="color: #006699; font-weight: bold;">$id</span><span style="color: #000099; font-weight: bold;">\&quot;</span> class=<span style="color: #000099; font-weight: bold;">\&quot;</span>more-link<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$more_link_text</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span></pre></div></div><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="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' &lt;a href=&quot;'</span><span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;#more-<span style="color: #006699; font-weight: bold;">$id</span><span style="color: #000099; font-weight: bold;">\&quot;</span> class=<span style="color: #000099; font-weight: bold;">\&quot;</span>more-link<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$more_link_text</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span></pre></div></div><p>Por esto:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' &lt;a href=&quot;'</span><span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> class=<span style="color: #000099; font-weight: bold;">\&quot;</span>more-link<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$more_link_text</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span></pre></div></div><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>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 7/11 queries in 0.011 seconds using disk

Served from: wordpress-hacks.com @ 2010-07-31 22:37:08 -->