<?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>WPoker :: Wordpress + Poker</title>
	<atom:link href="http://www.wpoker.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wpoker.me</link>
	<description>Le guide du blogueur Poker sous Wordpress...</description>
	<lastBuildDate>Wed, 16 May 2012 06:54:50 +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></title>
		<link>http://www.wpoker.me/2012/02/4005/</link>
		<comments>http://www.wpoker.me/2012/02/4005/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 09:14:09 +0000</pubDate>
		<dc:creator>WPoker</dc:creator>
		
		<guid isPermaLink="false">http://www.wpoker.me/?p=4005</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://www.wpoker.me/2012/02/4005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.wpoker.me/2012/02/3998/</link>
		<comments>http://www.wpoker.me/2012/02/3998/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 08:51:06 +0000</pubDate>
		<dc:creator>WPoker</dc:creator>
		
		<guid isPermaLink="false">http://www.wpoker.me/?p=3998</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://www.wpoker.me/2012/02/3998/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.wpoker.me/2012/02/3999/</link>
		<comments>http://www.wpoker.me/2012/02/3999/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 08:51:06 +0000</pubDate>
		<dc:creator>WPoker</dc:creator>
		
		<guid isPermaLink="false">http://www.wpoker.me/?p=3999</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://www.wpoker.me/2012/02/3999/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Home</title>
		<link>http://www.wpoker.me/2012/02/home/</link>
		<comments>http://www.wpoker.me/2012/02/home/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 08:48:00 +0000</pubDate>
		<dc:creator>WPoker</dc:creator>
		
		<guid isPermaLink="false">http://www.wpoker.me/?p=3995</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://www.wpoker.me/2012/02/home/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPoker</title>
		<link>http://www.wpoker.me/2012/02/wpoker/</link>
		<comments>http://www.wpoker.me/2012/02/wpoker/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 08:48:00 +0000</pubDate>
		<dc:creator>WPoker</dc:creator>
		
		<guid isPermaLink="false">http://www.wpoker.me/?p=3996</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://www.wpoker.me/2012/02/wpoker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Download</title>
		<link>http://www.wpoker.me/wpoker/download/</link>
		<comments>http://www.wpoker.me/wpoker/download/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 08:57:31 +0000</pubDate>
		<dc:creator>WPoker</dc:creator>
		
		<guid isPermaLink="false">http://www.wpoker.me/?page_id=3983</guid>
		<description><![CDATA[Version 0.1 : Download]]></description>
			<content:encoded><![CDATA[<p>Version 0.1 : <a href="http://www.wpoker.me/dl/wpoker.zip">Download</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpoker.me/wpoker/download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preview</title>
		<link>http://www.wpoker.me/wpoker/preview/</link>
		<comments>http://www.wpoker.me/wpoker/preview/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 08:28:43 +0000</pubDate>
		<dc:creator>WPoker</dc:creator>
		
		<guid isPermaLink="false">http://www.wpoker.me/?page_id=3979</guid>
		<description><![CDATA[normal cards : [Ad Tc 10h 5s]colors cards : [Xd Xs]high cards : [Ax 6x Tx]unknow card : [Xx]]]></description>
			<content:encoded><![CDATA[<p>normal cards : <IMG SRC="http://www.wpoker.me/wp-content/plugins/wpoker/images/cards/Ad.gif" alt="Ad" border="0"><IMG SRC="http://www.wpoker.me/wp-content/plugins/wpoker/images/cards/Tc.gif" alt="Tc" border="0"><IMG SRC="http://www.wpoker.me/wp-content/plugins/wpoker/images/cards/10h.gif" alt="10h" border="0"><IMG SRC="http://www.wpoker.me/wp-content/plugins/wpoker/images/cards/5s.gif" alt="5s" border="0"></p><div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[Ad Tc 10h 5s]</div></div><p>colors cards : <IMG SRC="http://www.wpoker.me/wp-content/plugins/wpoker/images/cards/Xd.gif" alt="Xd" border="0"><IMG SRC="http://www.wpoker.me/wp-content/plugins/wpoker/images/cards/Xs.gif" alt="Xs" border="0"></p><div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[Xd Xs]</div></div><p>high cards : <IMG SRC="http://www.wpoker.me/wp-content/plugins/wpoker/images/cards/Ax.gif" alt="Ax" border="0"><IMG SRC="http://www.wpoker.me/wp-content/plugins/wpoker/images/cards/6x.gif" alt="6x" border="0"><IMG SRC="http://www.wpoker.me/wp-content/plugins/wpoker/images/cards/Tx.gif" alt="Tx" border="0"></p><div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[Ax 6x Tx]</div></div><p>unknow card : <IMG SRC="http://www.wpoker.me/wp-content/plugins/wpoker/images/cards/Xx.gif" alt="Xx" border="0"></p><div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[Xx]</div></div>]]></content:encoded>
			<wfw:commentRss>http://www.wpoker.me/wpoker/preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPoker</title>
		<link>http://www.wpoker.me/wpoker/</link>
		<comments>http://www.wpoker.me/wpoker/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 08:27:59 +0000</pubDate>
		<dc:creator>WPoker</dc:creator>
		
		<guid isPermaLink="false">http://www.wpoker.me/?page_id=3977</guid>
		<description><![CDATA[Welcome to WPoker Page !You can find a preview here.You can download it here.]]></description>
			<content:encoded><![CDATA[<p>Welcome to WPoker Page !</p><p>You can find a <a href="http://www.wpoker.me/wpoker/preview/">preview here</a>.</p><p>You can <a href="http://www.wpoker.me/wpoker/download/">download it here</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpoker.me/wpoker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Post Type : Prenez le controle de votre blog !  Part II</title>
		<link>http://www.wpoker.me/2011/09/custom-post-type-prenez-le-controle-de-votre-blog-part-ii/</link>
		<comments>http://www.wpoker.me/2011/09/custom-post-type-prenez-le-controle-de-votre-blog-part-ii/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 08:36:31 +0000</pubDate>
		<dc:creator>WPoker</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Custom Post Type]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.wpoker.me/?p=3969</guid>
		<description><![CDATA[Nous allons continuer avec notre Custom Post Type &#171;&#160;CR&#160;&#187;, qui va vous permettre de faire vivre vos comptes rendus de tournois à vos lecteurs&#8230;La difficulté cette fois, n&#8217;est pas la personnalisation de l&#8217;affichage, mais l&#8217;intégration complète de ce nouveau type dans votre blog, les &#171;&#160;CR&#160;&#187; ne sont que des posts un peu particulier, ils doivent [...]]]></description>
			<content:encoded><![CDATA[<p>Nous allons continuer avec notre Custom Post Type &laquo;&nbsp;CR&nbsp;&raquo;, qui va vous permettre de faire vivre vos comptes rendus de tournois à vos lecteurs&#8230;</p><p>La difficulté cette fois, n&#8217;est pas la personnalisation de l&#8217;affichage, mais l&#8217;intégration complète de ce nouveau type dans votre blog, les &laquo;&nbsp;CR&nbsp;&raquo; ne sont que des posts un peu particulier, ils doivent être aussi accessible de vos visiteurs que n&#8217;importe quels autre post.</p><p><strong>Personnalisation de l&#8217;affichage:</strong></p><p>Comme il n&#8217;y a très peu de différence (dans le cas contraire, se reporter à l&#8217;<a title="Custom Post Type : Prenez le controle de votre blog !" href="http://www.wpoker.me/2011/08/custom-post-type-prenez-le-controle-de-votre-blog/">article précédent</a>), nous allons simplement modifier le fichier single.php :</p><p>A l&#8217;intérieur de votre loop, mettez ce code :</p><div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$type</span> <span style="color: #339933;">=</span> get_post_type<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'cr'</span><span style="color: #009900;">&#41;</span><br />
<br />
<span style="color: #009900;">&#123;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// ici votre code spécifique à votre CR</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div><p><strong>Intégration à votre blog:</strong></p><p>Pour l&#8217;instant votre CR n&#8217;apparait null part, ce est ballot si vous voulez être lu par quelqu&#8217;un d&#8217;autre que vous <img src='http://www.wpoker.me/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p><p>Nous allons nous occuper de index.php et archive.php (pour les autres pages, le principe restera le même).</p><p>Il faut &laquo;&nbsp;simplement&nbsp;&raquo; dire à la loop, d&#8217;ajouter vos CR.</p><p>(juste avant la loop) :</p><div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array_merge"><span style="color: #990000;">array_merge</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post_type'</span> <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'cr'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
query_posts<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$args</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div><p>Il faut ajouter nos paramètres à une requête déjà existante (cette page gère les tags, catégories etc&#8230;)</p><p><strong>Ajout dans le flux RSS:</strong></p><p>Si comme moi, la plupart de visiteurs viennent grâce à votre flux (sans compter des sites abonnés genre FB, Twitter etc..), il faut absolument ajouter vos CR à ce flux&#8230; un petit hook ferra l&#8217;affaire (je ne détaillerai pas le code aujourd&#8217;hui.. faites simplement un copier/coller dans functions.php)</p><div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> myfeed_request<span style="color: #009900;">&#40;</span><span style="color: #000088;">$qv</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$qv</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'feed'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$qv</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'post_type'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> get_post_types<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$qv</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'request'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'myfeed_request'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div><p>Voila qui clos ce gros morceau concernant les Custom Post Type, j&#8217;espère que cela vous servira à mieux comprendre son fonctionnement, et n&#8217;hésitez pas à me contacter en cas de difficulté sur votre blog.</p><p>A très bientôt pour de nouvelles aventure Pokero-WPiennes <img src='http://www.wpoker.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p><p>&nbsp;</p><p>&nbsp;</p><pre></pre><p>&nbsp;</p><p>&nbsp;</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpoker.me/2011/09/custom-post-type-prenez-le-controle-de-votre-blog-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Post Type : Prenez le controle de votre blog !</title>
		<link>http://www.wpoker.me/2011/08/custom-post-type-prenez-le-controle-de-votre-blog/</link>
		<comments>http://www.wpoker.me/2011/08/custom-post-type-prenez-le-controle-de-votre-blog/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 16:23:24 +0000</pubDate>
		<dc:creator>WPoker</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Custom Post Type]]></category>
		<category><![CDATA[taxonomie]]></category>

		<guid isPermaLink="false">http://www.wpoker.me/?p=3926</guid>
		<description><![CDATA[Après avoir vu les taxonomies et le moteur de template de WordPress, nous sommes prêt pour attaquer un gros morceau les &#171;&#160;Custom Post Type&#160;&#187;, autrement dit les types de poste personnalisés.Vous connaissez déjà les &#171;&#160;post&#160;&#187; , l&#8217;essence même d&#8217;un blog, c&#8217;est un message daté, et les &#171;&#160;page&#160;&#187; , contenant des éléments plus statiques, comme une [...]]]></description>
			<content:encoded><![CDATA[<p>Après avoir vu les taxonomies et le moteur de template de WordPress, nous sommes prêt pour attaquer un gros morceau les &laquo;&nbsp;Custom Post Type&nbsp;&raquo;, autrement dit les types de poste personnalisés.</p><p>Vous connaissez déjà les &laquo;&nbsp;post&nbsp;&raquo; , l&#8217;essence même d&#8217;un blog, c&#8217;est un message daté, et les &laquo;&nbsp;page&nbsp;&raquo; , contenant des éléments plus statiques, comme une page contact par exemple.</p><p>Grace aux &laquo;&nbsp;Custom Post Type&nbsp;&raquo; et au plugin <strong><a href="http://wordpress.org/extend/plugins/custom-post-type-ui/" target="_blank">Custom Post Type UI</a> </strong>(déjà installé normalement), nous allons pouvoir créer ces nouveaux types.</p><p>A titre d&#8217;exemple, nous allons créer 2 types de post :</p><p>- <strong>Poker Rooms</strong> : Une page qui contiendra tous les posts qui concerne la room en question, ou pourra ajouter son logo, un lien d&#8217;affiliation etc&#8230;</p><p style="padding-left: 30px;">ex: <a title="Custom Post Type Poker Rooms : Chili Poker" href="http://poker-blog.lipaonline.com/poker-rooms/chilipoker-fr" target="_blank">Chili Poker</a></p><p>- <strong>CR</strong> : Un message spécifique aux comptes rendus de tournoi.</p><p style="padding-left: 30px;">ex : <a href="http://poker-blog.lipaonline.com/mes-tournois/dso-sat-du-30-aout-2-packages-dso-garantis" target="_blank">Sat DSO</a></p><h3>Poker Rooms</h3><p>- <strong>Création du Custom Post Type :</strong></p><p>Retour dans le plugin, cette fois ci on va s&#8217;intéresser à la partie gauche de la fenêtre.</p><p><strong>Commençons par remplir le formulaire:</strong></p><p>Post Type Name : faites simple, pas d&#8217;espace ni de &laquo;&nbsp;-&nbsp;&raquo;&#8230; c&#8217;est un nom &laquo;&nbsp;interne&nbsp;&raquo;, &laquo;&nbsp;rooms&nbsp;&raquo; devrait faire l&#8217;affaire.</p><p>Custom Rewrite Slug : c&#8217;est le chemin que va voir le visiteur (et Google <img src='http://www.wpoker.me/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ), ajoutez des mots clés &#8230; je suis resté simple j&#8217;ai mis &laquo;&nbsp;poker-rooms&nbsp;&raquo;, vous pouvez mettre &laquo;&nbsp;site-poker-arjel&nbsp;&raquo; par exemple&#8230;</p><p>Pour les autres champs, <strong>laissez les valeurs par défaut</strong> pour l&#8217;instant.</p><p>- <strong>Personnalisation de l&#8217;affichage</strong> :</p><p>Pour l&#8217;instant, rien ne distingue pour le visiteur notre &laquo;&nbsp;Poker Room&nbsp;&raquo;, d&#8217;une page quelconque, il va falloir personnalisé l&#8217;affichage, pour cela &#8211; comme indiqué sur ce schéma &#8211; nous allons créer un fichier single-rooms.php (pour gérer l&#8217;affichage de la room)</p><blockquote><p>Il est possible aussi de simplement modifier single.php, mais cela va créer du code à rallonge, source de plus d&#8217;erreurs possibles , et en créant un nouveau fichier, cela limite les perturbations au seul nouveau type, sans gêner les autres posts&#8230;</p></blockquote><p>Copier le contenu de single.php dedans (pour partir sur une même base), ou repartez de zéro si vous maitriser la création de template sous WordPress&#8230;</p><p>Vous pouvez y ajouter votre bankroll sur cette room, un système de notation, un flux RSS vers leur blog etc&#8230;</p><p>Maintenant, comme sur mon <a href="http://poker-blog.lipaonline.com/poker-rooms/chilipoker-fr" target="_blank">exemple</a>, je vais vous montrer comment relier cette Poker Room avec les posts la concernant.</p><p>L&#8217;astuce est de créer une taxonomie &laquo;&nbsp;Rooms&nbsp;&raquo; , ainsi sur <a href="http://poker-blog.lipaonline.com/rooms/chilipoker-fr" target="_blank">cette page</a> , j&#8217;obtiens les articles qui concerne cette room.</p><p><span style="color: #ff0000;"><strong>ATTENTION</strong></span> : pour éviter que WordPress y perde son <del>latin</del> PHP, il ne faut surtout pas mettre les mêmes noms:</p><p>ex :  Post Type Name = <strong>pokerrooms</strong> &lt;&gt; Taxonomie Name = <strong>rooms</strong> , de même pour le <strong>Rewrite Slug</strong></p><p>Ainsi pour la taxonomie c&#8217;est <a href="http://poker-blog.lipaonline.com/rooms/chilipoker-fr" target="_blank">ici</a>, pour le Custom Post Type c&#8217;est <a href="http://poker-blog.lipaonline.com/poker-rooms/chilipoker-fr" target="_blank">la</a> .</p><p>Maintenant il on veut afficher cette <a href="http://poker-blog.lipaonline.com/rooms/chilipoker-fr" target="_blank">liste</a> sur cette <a href="http://poker-blog.lipaonline.com/poker-rooms/chilipoker-fr" target="_blank">page</a>.</p><p>Première chose à faire, récupérer le nom de la Room:</p><div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><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><br />
<br />
<span style="color: #000088;">$letax</span><span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_name</span><span style="color: #339933;">;</span></div></div><p>ensuite, il suffit de faire une Loop avec les articles de cette taxonomie:</p><div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
<span style="color: #0000ff;">'tax_query'</span> <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
<a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
<span style="color: #0000ff;">'taxonomy'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'rooms'</span><span style="color: #339933;">,</span><br />
<span style="color: #0000ff;">'field'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'slug'</span><span style="color: #339933;">,</span><br />
<span style="color: #0000ff;">'terms'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$letax</span><br />
<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// The Query</span><br />
<span style="color: #000088;">$the_query</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$args</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$the_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><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: #000088;">$the_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div><p>puis votre code d&#8217;affichage de votre Loop , pour ma part j&#8217;ai repris le code de index.php, en supprimant l&#8217;affichage du champs &laquo;&nbsp;Poker Rooms&nbsp;&raquo;.</p><p>Voila, nous avons fini notre Custom Post Type, il faut maintenant que le visiteur puisse y accéder.</p><p>Par exemple avec une liste dans la sidebar.php</p><div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pokerrooms'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$loop</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$args</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$loop</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><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: #000088;">$loop</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000088;">$values</span> <span style="color: #339933;">=</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'linkroom'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span><span style="color: #0000ff;">'&lt;li class=&quot;page_item page-item-230&quot;&gt;&lt;a &nbsp;href=&quot;'</span><span style="color: #339933;">.</span> <span style="color: #339933;">&lt;</span>code<span style="color: #339933;">&gt;</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&lt;/</span>code<span style="color: #339933;">&gt;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/a&gt;&lt;/li&gt;'</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span></div></div><p>Pour le Custom Post Type &laquo;&nbsp;CR&nbsp;&raquo; , cela fera l&#8217;objet d&#8217;un autre article, celui-ci étant déjà bien assez long&#8230;</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpoker.me/2011/08/custom-post-type-prenez-le-controle-de-votre-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

