<?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>WillxD &#187; Wordpress</title>
	<atom:link href="http://willxd.com/category/articulos/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://willxd.com</link>
	<description>La magia no existe, la programación sí !</description>
	<lastBuildDate>Tue, 13 Sep 2011 20:39:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Como Excluir Taxonomias en los Posts</title>
		<link>http://willxd.com/como-excluir-taxonomias-en-los-posts/</link>
		<comments>http://willxd.com/como-excluir-taxonomias-en-los-posts/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 14:27:08 +0000</pubDate>
		<dc:creator>WillxD</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://willxd.com/?p=4239</guid>
		<description><![CDATA[Como sabrán aún no existe la exclusión de las taxonomías en los loop de manera nativa, como lo hay con las categorías y tags. (Por lo menos en la versión 2.8.4). Para eso usaremos un sencillo hack, primero ponemos nuestro primer loop donde mostraremos los post contenidos en una específica Taxonomía y almacenaremos sus ID. [...]]]></description>
			<content:encoded><![CDATA[<div class="tut_image"><img src="http://willxd.com/wp-content/uploads/2009/10/excluir-taxonomias-wordpress.jpg" alt="excluir-taxonomias-wordpress" title="excluir-taxonomias-wordpress" width="500" height="295" class="aligncenter size-full wp-image-4251" /></div>
<p>Como sabrán aún no existe la exclusión de las taxonomías en los loop de manera nativa, como lo hay con las categorías y tags. (Por lo menos en la versión 2.8.4).</p>
<p>Para eso usaremos un sencillo hack, primero ponemos nuestro primer loop donde mostraremos los post contenidos en una específica Taxonomía y almacenaremos sus ID.</p>
<p><span id="more-4239"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$iddelpost</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// Definimos la variable como un arreglo</span>
	query_posts<span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
				<span style="color: #0000ff;">'Escritor'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Cesar Vallejo'</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// Nombre y Valor de nuestra Taxonomía</span>
				<span style="color: #0000ff;">'category_name'</span> <span style="color: #339933;">=&gt;</span> literatura<span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// Nombre de la Categoría</span>
				<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$iddelpost</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//almacenando los ID de los post del loop</span>
&nbsp;
			the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>       <span style="color: #666666; font-style: italic;">// Opcional, si no deseas mostrar el titulo, lo quitas</span>
			the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Opcional, si no deseas mostrar contenido, lo quitas</span>
&nbsp;
	<span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">//Reseteando la Consulta</span>
	wp_reset_query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>En el ejemplo anterior, el loop muestra los post de todas las Taxonomías "Escritor" que tengan el Valor de "Cesar Vallejo" y que estén en la categoría Literatura. </p>
<p>No es necesareo mostrar el contenido de los post, pero es necesareo este loop para almacenar los ID de los post que tienen esta taxonomía.</p>
<p>Una vez que ya tenemos almacenados todos los ID de nuestro loop anterior en el arreglo <strong>$iddelpost</strong>, procedemos a excluirlos.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>  query_posts<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'post__not_in'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$iddelpost</span><span style="color: #339933;">,</span>	<span style="color: #666666; font-style: italic;">// Excluyendo todos los Post del anterior Loop</span>
		<span style="color: #0000ff;">'category_name'</span> <span style="color: #339933;">=&gt;</span> literatura<span style="color: #339933;">,</span>	<span style="color: #666666; font-style: italic;">// Nombre de la categoría</span>
		<span style="color: #0000ff;">'showposts'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">5</span> <span style="color: #009900;">&#41;</span> 
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
			the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> wp_reset_query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>En este loop, mostramos los post de la Categoría Literatura, pero con la diferencia que no se mostrarán todos los post del anterior loop. Es decir no se mostrarán los post de la taxonomía "Escritor" con el valor "Cesar Vallejo".</p>
<p>Ahora que ya saben lo esencial, solo queda jugar un poco y ajustarlo a sus necesidades <img src='http://willxd.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://willxd.com/como-agregar-caratulas-o-covers-a-los-cd/' rel='bookmark' title='Permanent Link: Como agregar Caratulas o Covers a los CD'>Como agregar Caratulas o Covers a los CD</a></li>
<li><a href='http://willxd.com/como-instalar-lamp-en-ubuntu/' rel='bookmark' title='Permanent Link: Como Instalar LAMP en Ubuntu'>Como Instalar LAMP en Ubuntu</a></li>
<li><a href='http://willxd.com/como-convertir-presentaciones-ppt-a-videos-mp4/' rel='bookmark' title='Permanent Link: Como convertir presentaciones PPT a videos MP4'>Como convertir presentaciones PPT a videos MP4</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://willxd.com/como-excluir-taxonomias-en-los-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Breadcrumb en WordPress</title>
		<link>http://willxd.com/breadcrumb-en-wordpress/</link>
		<comments>http://willxd.com/breadcrumb-en-wordpress/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 22:00:06 +0000</pubDate>
		<dc:creator>WillxD</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://willxd.com/?p=2016</guid>
		<description><![CDATA[¿Qué es un Breadcrumb? Los Breadcrumb son unas guías de navegación para saber en todo momento donde nos econtramos. Generalmente los Breadcrumb tienen la siguiente forma: Inicio » Categoría » Subcategoría » Post ¿ En que me ayuda usar los Breadcrumb ? Los Breadcrumb ayudan a los usuarios a llegar a las categorías superiores de [...]]]></description>
			<content:encoded><![CDATA[<h3>¿Qué es un Breadcrumb?</h3>
<p>Los Breadcrumb son unas guías de navegación para saber en todo momento donde nos econtramos.<br />
Generalmente los Breadcrumb tienen la siguiente forma:</p>
<p><strong>Inicio » Categoría » Subcategoría » Post</strong></p>
<p><a href="http://willxd.com/breadcrumb-en-wordpress/"><img class="aligncenter size-full wp-image-2018" title="breadcrumb-en-wordpress-1" src="http://willxd.com/wp-content/uploads/2009/03/breadcrumb-en-wordpress-1.jpg" alt="breadcrumb-en-wordpress-1" width="460" height="400" /></a></p>
<p><span id="more-2016"></span></p>
<h3>¿ En que me ayuda usar los Breadcrumb ?</h3>
<ul>
<li>Los Breadcrumb ayudan a los usuarios a llegar a las categorías superiores de una manera más fácil.</li>
<li>Ayudan a los usuarios a saber donde se encuentran.</li>
<li>Ayuda a saber la temática del sitio, a los nuevos usuarios.</li>
</ul>
<h3>¿Cómo agrego un Breadcrumb a mi blog?</h3>
<p>Felizmente hay varias formas de hacerlo <img src='http://willxd.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  , pero las que les explicaré hoy son 3 formas:</p>
<ul>
<li>Usando el plugin Breadcrumb NavXT ( Puedes ver más Plugins <a href="http://wordpress.org/extend/plugins/search.php?q=breadcrumb">Aquí</a>)</li>
<li>Usando una interesante función de WordPress</li>
<li>Un pequeño código <img src='http://willxd.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </li>
</ul>
<ol>
<h4>
<li>Usando Breadcrumb NavXT</li>
</h4>
<p>Nos descargamos el plugin desde <a href="http://downloads.wordpress.org/plugin/breadcrumb-navxt.3.1.0.zip">acá</a>.<br />
Lo subimos a nuestra carpeta "Plugins" y lo activamos en nuestro panel. Una vez activado nos debe quedar algo asi:</p>
<p><img class="aligncenter size-full wp-image-2021" title="breadcrumb-en-wordpress-2" src="http://willxd.com/wp-content/uploads/2009/03/breadcrumb-en-wordpress-2.jpg" alt="breadcrumb-en-wordpress-2" width="550" height="75" /></p>
<p>Ahora nos iremos a Opciones » Breadcrumb NavXT y pasaremos a configurarlo. Su configuración es muy fácil, es muy intuitivo <img src='http://willxd.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><img class="aligncenter size-full wp-image-2024" title="breadcrumb-en-wordpress-3" src="http://willxd.com/wp-content/uploads/2009/03/breadcrumb-en-wordpress-3.jpg" alt="breadcrumb-en-wordpress-3" width="500" height="300" /></p>
<p>Una vez configurado, solo nos falta colocar un pequeño código en la plantilla de nuestra web.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;breadcrumb&quot;&gt; 
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'bcn_display'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> bcn_display<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
&lt;/div&gt;</pre></div></div>

<p>Y listo, ahora también podemos editar el estilo, agregando la clase breadcrumb en el CSS de nuestra plantilla.</p>
<h4>
<li>Usando la función</li>
</h4>
<p>Perfecta forma para quienes no nos gusta el uso de Plugins xD.</p>
<p>Primero debemos crear la función, copiaremos el siguiente código al archivo "functions.php" de nuesta plantilla.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;!--</span> Iniciamos la funcion Breadcrumb <span style="color: #339933;">--&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> the_breadcrumb<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>is_home<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span>
        bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/a&gt; » '</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            the_category<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_li='</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; » &quot;</span><span style="color: #339933;">;</span>
                the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span>is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">echo</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>    
&nbsp;
<span style="color: #339933;">&lt;!--</span> Fin de la función Breadcrumb <span style="color: #339933;">--&gt;</span></pre></div></div>

<p>Este código no es nada del otro mundo, tan solo hemos usado las <a href="http://ayudawordpress.com/tags-condicionales-en-wordpress/">tags condicionales de WordPress</a></p>
<p>Ahora debemos hacer el llamado a lo que hicimos en nuestro "functions.php" incluyendo el siguiente código en nuestra plantilla:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_breadcrumb<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h4>
<li>Otra forma</li>
</h4>
<p>Solo hay un inconveniente de usar esta forma, es que tiene algunas complicaciones cuando tenemos post publicados en varias categorías.</p>
<p>Lo único que debemos hacer es agregar este código a nuestra página donde queramos que se vea el Breadcrumb.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;INICIO&lt;/a&gt; &amp;raquo; 
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_category<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' and '</span><span style="color: #339933;">,</span>multiple<span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&amp;raquo;'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</ol>
<p>Listo, ahora ya tenemos 3 formas de como agregar Breadcrumb a nuestros sitios para que nuestros usuarios tengan una buena navegación.</p>


<p>Related posts:<ol><li><a href='http://willxd.com/sniptorg-comparte-codigo-via-twitter/' rel='bookmark' title='Permanent Link: Snipt.org comparte código vía Twitter'>Snipt.org comparte código vía Twitter</a></li>
<li><a href='http://willxd.com/como-descargar-fotos-de-flickr/' rel='bookmark' title='Permanent Link: Como descargar Fotos de Flickr'>Como descargar Fotos de Flickr</a></li>
<li><a href='http://willxd.com/reseteando-estilo-css/' rel='bookmark' title='Permanent Link: Reseteando estilo CSS'>Reseteando estilo CSS</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://willxd.com/breadcrumb-en-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

