<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Verificare contenuto term in taxonomy]]></title><description><![CDATA[<p dir="auto">Salve a tutti,<br />
premetto che in Php sono una frana?<br />
Sto utilizzando le taxonomies per definire due variabili (?serie? e ?volume?) da aggiungere al title, tipo:</p>
<p dir="auto">&lt;h1 class="post-title"&gt;<br />
&lt;?php the_title(); ?&gt; &lt;?php echo get_the_term_list($post-&gt;ID, 'serie'); ?&gt; &lt;?php echo get_the_term_list($post-&gt;ID, 'volume'); ?&gt;<br />
&lt;/h1&gt;</p>
<p dir="auto">vorrei però visualizzare ?volume? solo quando ha contenuto, quindi ho usato:</p>
<p dir="auto">&lt;?php<br />
$term_list_volume = get_the_term_list(get_the_ID(), 'volume');<br />
if (!empty($term_list_volume)):<br />
?&gt;<br />
&lt;?php echo $term_list_volume; ?&gt;<br />
&lt;?php endif; ?&gt;</p>
<p dir="auto">e fin qui funziona tutto. Il problema mi sorge però perché vorrei anche non visualizzare ?serie? quando contiene il testo ?One shot?.<br />
E qui mi sto scornando con verifiche dei contenuti, ma non ci salto fuori!<br />
Mi può dare una mano qualcuno?<br />
Grazie in anticipo.</p>
]]></description><link>https://dev.connect.gt/topic/219056/verificare-contenuto-term-in-taxonomy</link><generator>RSS for Node</generator><lastBuildDate>Sat, 28 Nov 2026 13:04:46 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/219056.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Nov 2015 08:13:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Verificare contenuto term in taxonomy on Mon, 23 Nov 2015 11:52:53 GMT]]></title><description><![CDATA[<p dir="auto">Perfetto!<br />
In realtà avevo trovato una soluzione un po' bulgara, cioè verificando se 'volume' è vuoto:</p>
<p dir="auto">$term_list_serie = get_the_term_list(get_the_ID(), 'volume');<br />
if (!empty($term_list_serie)): ?&gt;<br />
&lt;span&gt;( &lt;?php echo get_the_term_list($post-&gt;ID, 'serie'); ?&gt;<br />
&lt;?php endif; ?&gt;<br />
&lt;?php<br />
$term_list_volume = get_the_term_list(get_the_ID(), 'volume');<br />
if (!empty($term_list_volume)): ?&gt;<br />
- Vol.&lt;?php echo $term_list_volume; ?&gt;</p>
<p dir="auto">ma così mi sembra più corretto...<br />
Mille grazie!</p>
]]></description><link>https://dev.connect.gt/post/1211571</link><guid isPermaLink="true">https://dev.connect.gt/post/1211571</guid><dc:creator><![CDATA[halfblack]]></dc:creator><pubDate>Mon, 23 Nov 2015 11:52:53 GMT</pubDate></item><item><title><![CDATA[Reply to Verificare contenuto term in taxonomy on Mon, 23 Nov 2015 11:19:21 GMT]]></title><description><![CDATA[<p dir="auto">ciao halfblack e benvenuto,<br />
quello che devi fare è un'ennesima condizione:</p>
<pre><code class="language-php">&lt;?php if( !get_the_term_list(get_the_ID(), 'serie') === 'One shot' ) {
                  echo get_the_term_list(get_the_ID(), 'serie');
           }
?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/1211568</link><guid isPermaLink="true">https://dev.connect.gt/post/1211568</guid><dc:creator><![CDATA[ultima]]></dc:creator><pubDate>Mon, 23 Nov 2015 11:19:21 GMT</pubDate></item></channel></rss>