<?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>IoSmanetto.it - Blog programmazione e webdesign &#187; Php</title>
	<atom:link href="http://www.iosmanetto.it/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iosmanetto.it</link>
	<description>Il blog per tutti gli smanettoni del pc. Ogni giorno nuovi articoli sul webdesign e sulla programmazione</description>
	<lastBuildDate>Sat, 16 Apr 2011 16:19:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Prelevare la thumb di un&#8217;immagine, WordPress</title>
		<link>http://www.iosmanetto.it/php/prelevare-le-immagin-ni-da-un-post/</link>
		<comments>http://www.iosmanetto.it/php/prelevare-le-immagin-ni-da-un-post/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 17:15:57 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=657</guid>
		<description><![CDATA[In wordpress qualsiasi post può essere definito con una serie di elementi(attachments) come i video e le immagini .  Quando inseriamo un&#8217; immagine nel contenuto di un post è possibile prelevarla con una funzione php messa a disposizione da wordpress e isolarla dal contenuto. $images = get_children&#40;array&#40; 'post_type' =&#62; 'attachment', 'numberposts' =&#62; 1, 'post_status' =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>In wordpress qualsiasi post può essere definito con una serie di elementi(<strong>attachments</strong>) come i video e le immagini .  Quando inseriamo un&#8217; immagine nel contenuto di un post è possibile prelevarla con una funzione php messa a disposizione da wordpress e isolarla dal contenuto.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$images</span> <span style="color: #339933;">=</span> get_children<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #0000ff;">'post_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'attachment'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'numberposts'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'post_status'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'post_mime_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'image'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'post_parent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$image</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">//$attachment = wp_get_attachment_image_src($image-&gt;ID, $size);</span>
	<span style="color: #000088;">$attachment</span> <span style="color: #339933;">=</span> wp_get_attachment_image<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>La funzione <a href="http://codex.wordpress.org/Function_Reference/get_children"><strong>get_children()</strong></a>, che troviamo nella prima riga di questo script, è una funzione wordpress usata per prelevare dal database attachments, revisioni   o sotto pagine di un post genitore .</p>
<p><a href="http://codex.wordpress.org/Function_Reference/wp_get_attachment_image"><strong>Wp_get_attachment_image</strong></a> , invece, restituisce il codice html dell&#8217;immagine. Come secondo parametro è possibile inserire tre valori : <strong>thumbnail, medium, large or full</strong> .</p>
<p>Quandi se velessimo prelevare la thumb dell&#8217;immagine generata da wordpress basterebbe specificare nella funzione wp_get_attachment_image il valore thumbnail e il gioco è fatto <img src='http://www.iosmanetto.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/php/prelevare-le-immagin-ni-da-un-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Widget per ogni situazione con wordpress</title>
		<link>http://www.iosmanetto.it/php/widget-per-ogni-situazione-con-wordpress/</link>
		<comments>http://www.iosmanetto.it/php/widget-per-ogni-situazione-con-wordpress/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 20:00:02 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=578</guid>
		<description><![CDATA[I widget sono una delle cose piu&#8217; utili di wordpress perchè permettono di gestire il contenuto del sito in modo semplice ed immediato . Per chi non li conoscesse, essi non sono altro che dei box di semplice testo o box con plugin gestibili dal pannello admin. Il primo passo è quello di dichiarare le [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.iosmanetto.it/wp-content/uploads/2010/10/wordpress.jpg"><img class="alignleft size-full wp-image-588" title="wordpress" src="http://www.iosmanetto.it/wp-content/uploads/2010/10/wordpress.jpg" alt="" width="200" height="200" /></a>I <strong>widget </strong>sono una delle cose piu&#8217; utili di wordpress perchè permettono di gestire il contenuto del sito in modo semplice ed immediato . Per chi non li conoscesse, essi non sono altro che dei box di semplice testo o box con plugin gestibili dal pannello admin.</p>
<p>Il primo passo è quello di dichiarare le aree destinate a questo scopo nella pagina functions.php :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	register_sidebar<span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'Sidebar'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'sidebar'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'
	&lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;
'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'
&lt;h3 class=&quot;widget-title&quot;&gt;'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h3&gt;
'</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Nel parametro <em>name </em> inseriamo il nome dell&#8217;area . L&#8217;<em>id</em> ( secondo parametro ) è la stringa che identifica l&#8217;area . Con il <em>terzo e quarto</em> parametro indichiamo il codice che apre e chiude il box widget . <em>Before_title</em> e <em>after_title</em> sono i codici che aprono e chiudono il titolo del box .</p>
<p>Possiamo inserire quante  aree vogliamo , l&#8217;importante è dare un id diverso .</p>
<p>Il passo successivo consiste nel richiamare le aree dichiarate nelle pagine dove vogliamo visualizzarle :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;sidebar&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>La funzione dynamic_sidebar accetta come argomento l&#8217;id dell&#8217;area .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/php/widget-per-ogni-situazione-con-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Escludere categoria/e dalla home del nostro blog wordpress</title>
		<link>http://www.iosmanetto.it/php/escludere-categorie-da-wordpress/</link>
		<comments>http://www.iosmanetto.it/php/escludere-categorie-da-wordpress/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 00:37:41 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[trip & tricks]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=548</guid>
		<description><![CDATA[A volte abbiamo la necessità di isolare dei post che appartengono ad una determinata categoria. Purtroppo, attualmente, dal pannello wordpress non è possibile gestire direttamente questo piccolo particalare. Nulla pero&#8217; è impossibile, inserendo una semplice riga di codice è possibile ottenere l&#8217;effetto desiderato. Prima di procedere è assolutamente necessario conoscere l&#8217;identificativo della/e categoria/e da discriminare [...]]]></description>
			<content:encoded><![CDATA[<p>A volte abbiamo la necessità di<strong> isolare dei post che appartengono ad una determinata categoria</strong>. Purtroppo, attualmente, <strong>dal pannello wordpress non è possibile</strong> gestire direttamente questo piccolo particalare. Nulla pero&#8217; è impossibile, inserendo una semplice riga di codice è possibile ottenere l&#8217;effetto desiderato.<span id="more-548"></span></p>
<p>Prima di procedere <strong>è assolutamente necessario conoscere l&#8217;identificativo della/e categoria/e da discriminare in home</strong>.  Dal pannello wordpress  in gestione categorie è  possibile ricavare l&#8217;id di qualsiasi categoria inserita. Dopo aver individuato la lista di tutte le categorie, basta spostare il cursore del mouse sopra la categoria da analizzare. Se date un&#8217; occhiata in basso a sinistra del vostro browser, noterete un url del tipo &#8220;www.mioblog.it/wp-admin/&#8230;..&#8221; con diversi parametri verso la fine della stringa. Il parametro da prendere in considerazione è <em>tag_id,</em> annotatelo su un foglio di carta o copiatelo nella clipboard .</p>
<p><a href="http://www.iosmanetto.it/wp-content/uploads/2010/09/prelevare_id_categoria_wordpress1.jpg"><br />
</a><a id="post-preview" class="preview button" tabindex="4" href="../?p=548&amp;preview=true" target="wp-preview"></a><a href="http://www.iosmanetto.it/wp-content/uploads/2010/09/prelevare_id_categoria_wordpress2.jpg"><img class="aligncenter size-full wp-image-554" title="prelevare_id_categoria_wordpress" src="http://www.iosmanetto.it/wp-content/uploads/2010/09/prelevare_id_categoria_wordpress2.jpg" alt="" width="515" height="331" /></a></p>
<p>Perfetto, ora non ci resta che fornire a wordpress gli id delle categorie da escludere in homepage. Per fare ciò, <strong>modifichiamo la pagina index.php</strong> del nostro theme wordpress inserendo in alto, dopo la funzione che richiama la header ( get_header() ) , il seguente codice :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$query_string</span><span style="color: #339933;">;</span>
query_posts<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query_string</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&amp;cat=-id_category&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><span style="color: #ee2b11;"><strong>Nota :</strong></span> non dimenticate di aggiungere prima dell&#8217;id category il trattino ( &#8211; ).</p>
<p>Se vuoi aggiungere più categorie nella query basta separarle con una virgola, esempio :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$query_string</span><span style="color: #339933;">;</span>
query_posts<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query_string</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&amp;cat=-23,-21,-34&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Spero di esservi stato utile, alla prossima !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/php/escludere-categorie-da-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Costum Field in wordpress , &#8220;Utilissimi!&#8221;</title>
		<link>http://www.iosmanetto.it/php/costum-field-in-wordpress-utilissimi/</link>
		<comments>http://www.iosmanetto.it/php/costum-field-in-wordpress-utilissimi/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 13:44:42 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=489</guid>
		<description><![CDATA[I Costum Field non sono altro che dei campi aggiuntivi da inserire in post e pagine per organizzare al meglio le informazioni . Dal mio punto di vista questa funzione è una delle più utili di wordpress perchè permette di creare dei veri e propri cms . Inserirne uno è davvero semplice . Quando stai [...]]]></description>
			<content:encoded><![CDATA[<p>I <strong>Costum Field</strong> non sono altro che dei campi aggiuntivi da inserire in post e pagine per organizzare al meglio le informazioni . Dal mio punto di vista questa funzione è una delle più utili di wordpress perchè permette di creare dei veri e propri cms .</p>
<p>Inserirne uno è davvero semplice . Quando stai per salvare un nuovo post , in fondo alla pagina avrai sicuramente notato il box &#8220;Campi personalizzati&#8221; . Da li è possibile aggiungere tutti i parametri che vuoi .</p>
<p>Nella versione 3.0 di wordpress occorrono i seguenti passaggi :</p>
<ol>
<li>Fare click su <em>Aggiungere Nuovo</em></li>
<li>Compilare i due campi Nome e Valore</li>
<li>Fare click su <em>Aggiungi Campo Personalizzato</em></li>
</ol>
<p><span id="more-489"></span><br />
Per richiamare i valori all&#8217;interno del post/pagina possiamo usare la funzione <em>get_post_meta </em>che accetta tre parametri . Ecco la sintassi della funzione :</p>
<p><em>get_post_meta(idpost,key,bArray)</em></p>
<p><strong><em>idpost</em> </strong>Se non conosciamo l&#8217;id del post basta usare la variabile $post-&gt;ID .</p>
<p><strong><em>key</em> </strong>Il nome del parametro inserito precedentemente</p>
<p><strong><em>bArray </em></strong>Se impostata su <em>true </em>restituisce il valore sotto forma di stringa . Se esistono piu&#8217; field con lo stesso nome restituisce l&#8217;ultimo inserito . Se invece è impostato su <em>false </em>restituisce un array di stringhe .</p>
<p>Proviamo a realizzare una semplice applicazione , tanto per capire l&#8217;importanza dei campi personalizzati : sviluppiamo una semplice fotogallery da inserire nei post .</p>
<p>Per prima cosa apriamo la pagina <em>single.php</em> e individuiamo il ciclo loop principale :</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: #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: #000000; font-weight: bold;">?&gt;</span>
...
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <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: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>All&#8217;interno del ciclo inseriamo il seguente codice :</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;">$n</span> <span style="color: #339933;">=</span> get_post_meta<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: #339933;">,</span><span style="color: #0000ff;">&quot;numero gallerie&quot;</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  		
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;=</span> <span style="color: #000088;">$n</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$mykey_values</span> <span style="color: #339933;">=</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;galleria_<span style="color: #006699; font-weight: bold;">$i</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$nome</span> <span style="color: #339933;">=</span> get_post_meta<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: #339933;">,</span><span style="color: #0000ff;">&quot;galleria_&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$i</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;_titolo&quot;</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
?   <span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;boxSub&quot;</span><span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$nome</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
        &lt;ul class=&quot;images&quot;&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span>   <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$mykey_values</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$value</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$value</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
          <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        &lt;/ul&gt;
        &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
      &lt;/div&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span>     
<span style="color: #009900;">&#125;</span>
	  <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Se vogliamo inserire una o piu&#8217; gallerie all&#8217;interno di un post o una pagina dobbiamo inserire i seguenti campi personalizzati :</p>
<ul>
<li><strong>numero gallerie</strong> &#8211; Qui inserire quante sono le gallerie</li>
<li><strong>galleria_<em>id</em>_titolo</strong> &#8211; Dove id è l&#8217;identificativo della galleria , in questo campo dovete inserire il nome della galleria</li>
<li><strong>galleria_<em>id</em></strong> &#8211; Inserite tante volte questo campo quanti sono le immagini della galleria . In questi campi dovete aggiungere il link delle immagini</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/php/costum-field-in-wordpress-utilissimi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Inviamo una semplice email con PHP</title>
		<link>http://www.iosmanetto.it/php/inviamo-una-email-con-mail/</link>
		<comments>http://www.iosmanetto.it/php/inviamo-una-email-con-mail/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 21:56:01 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[trip & tricks]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=397</guid>
		<description><![CDATA[In php è possibile inviare una email con la funzione mail() Un semplice esempio potrebbe essere il seguente : $mes = &#34;Questa è una email di prova&#34;; if&#40;mail&#40;&#34;destinatario@email.com&#34;,&#34;Oggetto email&#34;,$mes&#41;&#41;&#123; echo &#34;Messaggio Inviato&#34;; &#125;else&#123; echo &#34;Messaggio non inviato&#34;; &#125; Il primo parametro della funzione è il destinatario . Il secondo l&#8217;oggetto dell&#8217;email e l&#8217;ultimo il messaggio.]]></description>
			<content:encoded><![CDATA[<p>In php è possibile inviare una email con la funzione mail()</p>
<p>Un semplice esempio potrebbe essere il seguente :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$mes</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Questa è una email di prova&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;destinatario@email.com&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Oggetto email&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$mes</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;Messaggio Inviato&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
       <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Messaggio non inviato&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Il primo parametro della funzione è il destinatario . Il secondo l&#8217;oggetto dell&#8217;email e l&#8217;ultimo il messaggio.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/php/inviamo-una-email-con-mail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>La dimensione di una immagine in PHP</title>
		<link>http://www.iosmanetto.it/php/dimensione-di-un-immagine-php/</link>
		<comments>http://www.iosmanetto.it/php/dimensione-di-un-immagine-php/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 18:48:05 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=286</guid>
		<description><![CDATA[E&#8217; possibile ricavare la dimensione di un immagine con la funzione getimagesize() del framework php  . $infoImage = getimagesize&#40;&#34;images/sample.jpg&#34;&#41;; GetImageSize restituisce un array con alcune info dell&#8217;immagine $infoImage[0] e $infoImage[1] rappresentano rispettivamente la larghezza e l&#8217;altezza dell&#8217;immagine. list&#40;$width,$height&#41; = getimagesize&#40;&#34;images/simple.jpg&#34;&#41;; Con la funzione list() memorizziamo il primo elemento e il secondo elemento dell&#8217;array restituito da [...]]]></description>
			<content:encoded><![CDATA[<p>E&#8217; possibile ricavare la dimensione di un immagine con la funzione <strong>getimagesize() </strong>del framework php  .</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$infoImage</span> <span style="color: #339933;">=</span> <span style="color: #990000;">getimagesize</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;images/sample.jpg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>GetImageSize restituisce un array con alcune info dell&#8217;immagine</p>
<p>$infoImage[0] e $infoImage[1] rappresentano rispettivamente la larghezza e l&#8217;altezza dell&#8217;immagine.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span><span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">getimagesize</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;images/simple.jpg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Con la funzione list() memorizziamo il primo elemento e il secondo elemento dell&#8217;array restituito da getimagesize nelle varibili $width e $height.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/php/dimensione-di-un-immagine-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ultimo elemento di un array PHP</title>
		<link>http://www.iosmanetto.it/php/ultimo-elemento-di-un-array-php/</link>
		<comments>http://www.iosmanetto.it/php/ultimo-elemento-di-un-array-php/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 20:54:42 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=216</guid>
		<description><![CDATA[Dato il segunte array : $array&#91;0&#93; = &#34;Francesco&#34;; $array&#91;1&#93; = &#34;Alessio&#34;; $array&#91;2&#93; = &#34;Valerio&#34;; Se io avessi bisogno dell&#8217;ultimo elemento ? echo end&#40;$array&#41;; // Stampa Valerio echo $array&#91;count&#40;$array&#41;-1&#93;; // Stampa Valerio I due metodi sono equivalenti . Preferisco il primo perchè il codice è molto più pulito]]></description>
			<content:encoded><![CDATA[<p>Dato il segunte array :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Francesco&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Alessio&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Valerio&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p><span id="more-216"></span><br />
Se io avessi bisogno dell&#8217;ultimo elemento ?</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #990000;">end</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$array</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Stampa Valerio</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$array</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Stampa Valerio</span></pre></div></div>

<p>I due metodi sono equivalenti . Preferisco il primo perchè il codice è molto più pulito</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/php/ultimo-elemento-di-un-array-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sostituzione multipla in una stringa con php</title>
		<link>http://www.iosmanetto.it/php/sostituzione-multipla-in-una-stringa-con-php/</link>
		<comments>http://www.iosmanetto.it/php/sostituzione-multipla-in-una-stringa-con-php/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 18:17:52 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=166</guid>
		<description><![CDATA[Con str_replace() è possibile sostituire una porzione di stringa con un altra. $stringa = &#34;elementodasostituire qui testo ecc&#34;; $stringa = str_replace&#40;&#34;elementodasostituire&#34;,&#34;qui testo&#34;,$stringa&#41;; echo $stringa; Il risultato che ci aspettiamo è qui testo qui testo ecc Ma se avessi piu&#8217; elementi da sostituire ? Dovrei fare una cosa del genere : $stringa = &#34;elementodasostituire1, elementodasostituire2, elementodasostituire3 [...]]]></description>
			<content:encoded><![CDATA[<p>Con str_replace() è possibile sostituire una porzione di stringa con un altra.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$stringa</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;elementodasostituire qui testo ecc&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$stringa</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;elementodasostituire&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;qui testo&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$stringa</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$stringa</span><span style="color: #339933;">;</span></pre></div></div>

<p>Il risultato che ci aspettiamo è</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">qui testo qui testo ecc</pre></div></div>

<p>Ma se avessi piu&#8217; elementi da sostituire ?</p>
<p>Dovrei fare una cosa del genere :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$stringa</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;elementodasostituire1, elementodasostituire2, elementodasostituire3 qui testo ecc&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$stringa</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;elementodasostituire1&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;testo1&quot;</span> <span style="color: #339933;">,</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;elementodasostituire2&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;testo2&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;elementodasostituire3&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;testo3&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$stringa</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$stringa</span><span style="color: #339933;">;</span></pre></div></div>

<p><span id="more-166"></span><br />
Il codice è poco leggibile. Realizziamo una funzione che ci puo&#8217; aiutare:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> str_replaceByArray<span style="color: #009900;">&#40;</span><span style="color: #000088;">$theArray</span><span style="color: #339933;">,</span><span style="color: #000088;">$stringa</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: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$theArray</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$theArray</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$valore</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$stringa</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span><span style="color: #339933;">,</span> <span style="color: #000088;">$valore</span><span style="color: #339933;">,</span> <span style="color: #000088;">$stringa</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;">return</span> <span style="color: #000088;">$stringa</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$stringa</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;elementodasostituire1, elementodasostituire2, elementodasostituire3 qui testo ecc&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$replace</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;elementodasostituire1&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">&quot;testo1&quot;</span> <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;elementodasostituire2&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">&quot;testo2&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;elementodasostituire3&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">&quot;testo3&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$stringa</span> <span style="color: #339933;">=</span> str_replaceByArray<span style="color: #009900;">&#40;</span><span style="color: #000088;">$replace</span><span style="color: #339933;">,</span><span style="color: #000088;">$stringa</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$stringa</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/php/sostituzione-multipla-in-una-stringa-con-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Pulire una stringa dai tag html con strip_tags</title>
		<link>http://www.iosmanetto.it/php/filtrare-stringa-da-tag-html-con-strip_tags/</link>
		<comments>http://www.iosmanetto.it/php/filtrare-stringa-da-tag-html-con-strip_tags/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:14:11 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=150</guid>
		<description><![CDATA[Strip_tags è una delle tante funzioni del framework php. Il suo funzionamento è molto semplice ed efficace. Ci permette di eliminare qualunque tag html presente in una stringa. $stringa = &#34;&#60;a href=&#34;http://www.google.it&#34;&#62;testo 1&#60;/a&#62;&#34;; echo strip_tags&#40;$stringa&#41;; Risultato: testo 1 Il secondo parametro della funzione è opzionale . Ci permette di specificare quali tag non cancellare $stringa [...]]]></description>
			<content:encoded><![CDATA[<p>Strip_tags è una delle tante funzioni del framework php. Il suo funzionamento è molto semplice ed efficace. Ci permette di eliminare qualunque tag html presente in una stringa.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$stringa</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;a href=&quot;</span>http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.google.it&quot;&gt;testo 1&lt;/a&gt;&quot;;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$stringa</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Risultato:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">testo 1</pre></div></div>

<p>Il secondo parametro della funzione è opzionale . Ci permette di specificare quali tag non cancellare</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$stringa</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;a href=&quot;</span>http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.google.it&quot;&gt;testo 1&lt;/a&gt; &lt;strong&gt;bold1&lt;/strong&gt;&lt;em&gt;corsivo&lt;/em&gt;&quot;;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$stringa</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;strong&gt;&lt;em&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>em<span style="color: #339933;">&gt;&lt;/</span>strong<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong><em>Risultato:</em></strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;strong&gt;&lt;em&gt;testo 1 &lt;strong&gt;bold1&lt;/strong&gt;&lt;em&gt;corsivo&lt;/em&gt;&lt;/em&gt;&lt;/strong&gt;</pre></div></div>

<p><strong><em>Documentazione ufficiale  : <a href="http://php.net/manual/en/function.strip-tags.php">function.strip-tags.php</a></em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/php/filtrare-stringa-da-tag-html-con-strip_tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prelevare la prima immagine di un post wordpress</title>
		<link>http://www.iosmanetto.it/php/prelevare-la-prima-immagine-di-un-post-wordpress/</link>
		<comments>http://www.iosmanetto.it/php/prelevare-la-prima-immagine-di-un-post-wordpress/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 11:03:08 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=90</guid>
		<description><![CDATA[A volte, per esigenze grafiche, si ha la necessità di isolare le immagini del nostro theme wordpress, e manipolarle come ci piace. Questa funzione è realizzabile. Vi posto il codice : function get_first_image&#40;$post&#41;&#123; preg_match_all&#40;'/&#38;lt;img.+src=[\'&#34;]([^\'&#34;]+)[\'&#34;].*&#38;gt;/i', $post-&#38;gt;post_content, $matches&#41;; $firstimage = $matches&#91;1&#93;&#91;0&#93;; return $firstimage; &#125; Per renderla visibile in tutto il theme wordpress, basta inserirla nella pagina functions.php]]></description>
			<content:encoded><![CDATA[<p>A volte, per esigenze grafiche, si ha la necessità di isolare le immagini del nostro theme wordpress, e manipolarle come ci piace.</p>
<p>Questa funzione è realizzabile. Vi posto il codice :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> get_first_image<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">preg_match_all</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/&amp;lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&amp;gt;/i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>post_content<span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$firstimage</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$firstimage</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Per renderla visibile in tutto il theme wordpress, basta inserirla nella pagina functions.php</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/php/prelevare-la-prima-immagine-di-un-post-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

