<?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; wordpress</title>
	<atom:link href="http://www.iosmanetto.it/tag/wordpress/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>Jquery : checkbox selezionato ?</title>
		<link>http://www.iosmanetto.it/javascript/jquery-checkbox-selezionato/</link>
		<comments>http://www.iosmanetto.it/javascript/jquery-checkbox-selezionato/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 13:55:24 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=506</guid>
		<description><![CDATA[Validare un form con jquery è davvero semplice : occorrono poche istruzioni per scrivere una funzione completa e sicura . Non avevo mai validato un checkbox con jquery , cosi mi sono chiesto come sia possibile farlo senza usare javascript puro . Girovagando sul sito di jquery sono arrivato ad una semplice conclusione , usare [...]]]></description>
			<content:encoded><![CDATA[<p>Validare un form con <strong>jquery </strong>è davvero semplice : occorrono poche istruzioni per scrivere una funzione completa e sicura .<br/> Non avevo mai validato un checkbox con jquery , cosi mi sono chiesto come sia possibile farlo senza usare javascript puro .<br/><br />
Girovagando sul sito di jquery  sono arrivato ad una semplice conclusione , usare la funzione <em>is()</em> .</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#id_checkbox&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:checked&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      <span style="color: #006600; font-style: italic;">// Se checkbox è selezionato</span>
<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
      <span style="color: #006600; font-style: italic;">// Se checkbox non è selezionato</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Spero di esservi stato utile <img src='http://www.iosmanetto.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  A domani !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/javascript/jquery-checkbox-selezionato/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>Convertiamo il footer &#8211; Realizziamo un theme wordpress</title>
		<link>http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-parte-6/</link>
		<comments>http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-parte-6/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 13:31:08 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Css]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[conversione]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=271</guid>
		<description><![CDATA[Indice guida - Introduzione - Convertiamo header - Commento prima parte del codice css - Convertiamo i post - Convertiamo la sidebar - Convertiamo il footer Convertendo il footer concludiamo la conversione generale del nostro theme wordpress. Nei prossimi articoli installeremo wordpress ed adatteremo easyTheme. Il footer ha una struttura abbastanza semplice. Si tratta di [...]]]></description>
			<content:encoded><![CDATA[<p><em>Indice guida<br />
</em></p>
<ol>
<li><em>- <a href="http://www.iosmanetto.it/php/convertire-e-convertire-e-adattare-theme-wordpress/">Introduzione</a></em></li>
<li><em>- <a href="http://www.iosmanetto.it/php/convertire-e-adattare-theme-wordpress-2/">Convertiamo header</a></em></li>
<li><em>- <a href="http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-%e2%80%93-parte-3/">Commento prima parte del codice css</a></em></li>
<li><em>- <a href="http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-%E2%80%93-parte-4/">Convertiamo i post</a></em></li>
<li><em>- <a href="http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-%e2%80%93-parte-5/">Convertiamo la sidebar</a></em></li>
<li>- Convertiamo il footer</li>
</ol>
<p>Convertendo il footer concludiamo la conversione generale del nostro theme wordpress. Nei prossimi articoli installeremo wordpress ed adatteremo <a href="http://www.iosmanetto.it/wp-content/uploads/2009/12/easyTheme.png">easyTheme</a>.</p>
<p>Il footer ha una struttura abbastanza semplice. Si tratta di due contenitori ( #footer e #footer-main ) . Il primo contenitore avrà una larghezza dinamica ( occupa orizzontalmente tutta la pagina) . Mentre il secondo contenitore sarà un div di 999px centrato.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;footer&quot;&gt;
&lt;div id=&quot;footer-main&quot;&gt;Qui footer&lt;/div&gt;
&lt;/div&gt;</pre></div></div>

<p><br/></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#footer</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#D7D7D7</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#footer-main</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">999px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><br/><br />
<object width="515" height="405"><param name="movie" value="http://www.youtube.com/v/auRU_cVZMZM&#038;hl=it_IT&#038;fs=1&#038;color1=0x006699&#038;color2=0x54abd6&#038;border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/auRU_cVZMZM&#038;hl=it_IT&#038;fs=1&#038;color1=0x006699&#038;color2=0x54abd6&#038;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="515" height="405"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-parte-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guida alla realizzazione di un Theme WordPress – Parte 4</title>
		<link>http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-%e2%80%93-parte-4/</link>
		<comments>http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-%e2%80%93-parte-4/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 16:53:08 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Css]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[conversione]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=182</guid>
		<description><![CDATA[Indice guida - Introduzione - Convertiamo header - Commento prima parte del codice css - Convertiamo i post Eccoci al 4° appuntamento della guida . Oggi convertiremo i post del nostro theme wordpress. Aggiornare la index.html con questo nuovo codice : &#38;lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#38;gt; &#38;lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#38;gt; &#38;lt;head&#38;gt; &#38;lt;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; [...]]]></description>
			<content:encoded><![CDATA[<p><em>Indice guida<br />
</em></p>
<ol>
<li><em>- <a href="http://www.iosmanetto.it/php/convertire-e-convertire-e-adattare-theme-wordpress/">Introduzione</a></em></li>
<li><em>- <a href="http://www.iosmanetto.it/php/convertire-e-adattare-theme-wordpress-2/">Convertiamo header</a></em></li>
<li><em>- <a href="http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-%e2%80%93-parte-3/">Commento prima parte del codice css</a></em></li>
<li><em>- Convertiamo i post</em></li>
</ol>
<p>Eccoci al 4° appuntamento della guida . Oggi convertiremo i post del nostro theme wordpress.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="515" height="405" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/PfLn8qkgKjA&amp;hl=it_IT&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6&amp;border=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="515" height="405" src="http://www.youtube.com/v/PfLn8qkgKjA&amp;hl=it_IT&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6&amp;border=1" allowscriptaccess="always" allowfullscreen="true"></embed></object><span id="more-182"></span></p>
<p>Aggiornare la index.html con questo nuovo codice :</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;
&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;gt;
&amp;lt;title&amp;gt;EasyTheme by iosmanetto.it&amp;lt;/title&amp;gt;
&amp;lt;style type=&quot;text/css&quot;&amp;gt;
@import &quot;style.css&quot;;
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div id=&quot;conteiner&quot;&amp;gt;
 &amp;lt;div id=&quot;header&quot;&amp;gt;
 &amp;lt;div id=&quot;logo&quot;&amp;gt;My &amp;lt;em&amp;gt;first&amp;lt;/em&amp;gt; theme&amp;lt;/div&amp;gt;
 &amp;lt;div id=&quot;slogan&quot;&amp;gt;Qui slogon wordpress&amp;lt;/div&amp;gt;
 &amp;lt;div style=&quot;clear:both&quot;&amp;gt;&amp;lt;/div&amp;gt;
 &amp;lt;/div&amp;gt;
 &amp;lt;div id=&quot;main&quot;&amp;gt;
 &amp;lt;div class=&quot;post&quot;&amp;gt;
 &amp;lt;div class=&quot;title&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Qui titolo post&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;
 &amp;lt;div class=&quot;detail&quot;&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Nome Categoria&amp;lt;/a&amp;gt; | Autore | Data&amp;lt;/div&amp;gt;
 &amp;lt;div class=&quot;entry&quot;&amp;gt;qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo qui testo &amp;lt;a href=&quot;#&quot; class=&quot;more-link&quot;&amp;gt;Continua a leggere &amp;amp;gt;&amp;lt;/a&amp;gt; &amp;lt;/div&amp;gt;
 &amp;lt;/div&amp;gt;
 &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;</pre></div></div>

<p>Ho aggiunto la struttura del post e modificato un piccolo particolare della header.</p>
<p>Prima della chiusura del div <em>header </em>ho inserito un contenitore(div) con un clear:both. Clear both specifica che gli elementi successivi non saranno adiacenti all&#8217;elemento float di <em>slogan</em>.</p>
<p>La struttura del post è la seguente</p>
<p>Nel div <em>title </em>ci andrà il titolo del post. In <em>detail </em>i dettagli del post come l&#8217;autore , le categorie e i tags .Infine in <em>entry </em>il testo del post.</p>
<p>Aprite il file style.css e inserite nell&#8217;ultima riga queste regole</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#main</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">540px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#main</span> .post<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#main</span> <span style="color: #6666ff;">.post</span> .title<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">24px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#326EA1</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#main</span> <span style="color: #6666ff;">.post</span> <span style="color: #6666ff;">.title</span> a<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#326EA1</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#main</span> <span style="color: #6666ff;">.post</span> <span style="color: #6666ff;">.title</span> a<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#326EA1</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#main</span> <span style="color: #6666ff;">.post</span> .detail<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">oblique</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#main</span> <span style="color: #6666ff;">.post</span> <span style="color: #6666ff;">.detail</span> a<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#main</span> <span style="color: #6666ff;">.post</span> <span style="color: #6666ff;">.detail</span> a<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#main</span> <span style="color: #6666ff;">.post</span> .entry<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">16px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">160</span>%</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#main</span> <span style="color: #6666ff;">.post</span> <span style="color: #6666ff;">.entry</span> .more-link<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">14px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#003366</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#main</span> <span style="color: #6666ff;">.post</span> <span style="color: #6666ff;">.entry</span> <span style="color: #6666ff;">.more-link</span><span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>La maggior parte del codice lo conosciamo già. Occorre commentare i seguenti comandi :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">oblique</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">160</span>%</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span></pre></div></div>

<ol>
<li>Effetto sottolineatura del testo non impostato</li>
<li>Effetto sottolineatura del testo impostato</li>
<li>Testo in corsivo</li>
<li>La distanza tre due righe di testo è uguale al 160% rispetto alle dimensioni del font</li>
<li>Trasformiamo l&#8217;elemento in un  blocco ( come un div )</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-%e2%80%93-parte-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guida alla realizzazione di un Theme WordPress – Parte 3</title>
		<link>http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-%e2%80%93-parte-3/</link>
		<comments>http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-%e2%80%93-parte-3/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 22:14:20 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Css]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[conversione]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=121</guid>
		<description><![CDATA[Indice guida - Introduzione - Convertiamo header - Commento prima parte del codice css Oggi spiegheremo passo passo il codice css, scritto nell&#8217;articolo precedente. body&#123; margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; &#125; #conteiner&#123; width:999px; margin:0 auto; padding:0 30px; &#125; #header&#123; padding:40px 0; &#125; #header #logo&#123; float:left; padding:0 30px 0 0; font-family:&#34;Times New Roman&#34;, Times, serif; font-size:36px; [...]]]></description>
			<content:encoded><![CDATA[<p><em>Indice guida<br />
</em></p>
<ol>
<li><em>- <a href="http://www.iosmanetto.it/php/convertire-e-convertire-e-adattare-theme-wordpress/">Introduzione</a></em></li>
<li><em>- <a href="http://www.iosmanetto.it/php/convertire-e-adattare-theme-wordpress-2/">Convertiamo header</a></em></li>
<li><em>- Commento prima parte del codice css<br />
</em></li>
</ol>
<p>Oggi spiegheremo passo passo il codice css, scritto nell&#8217;articolo precedente.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Arial</span><span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#conteiner</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">999px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span> <span style="color: #cc00cc;">#logo</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">30px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">,</span> Times<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">36px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#3C3C30</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#CCCCCC</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span> <span style="color: #cc00cc;">#slogan</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span> <span style="color: #cc00cc;">#logo</span> em<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#69950F</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Prima di procedere, devo parlarvi di alcuni concetti chiave per la sintassi del css.<br />
Per attribuire una determinata proprietà a un elemento html , si usano i selettori . Sono selettori, nel nostro caso :<br />
&#8216;body&#8217;,'#conteiner&#8217;,'#header&#8217;,'#header #logo&#8217;,'#header #slogan&#8217; e &#8216;#header #logo em&#8217;.<br />
Se non avete mai smanettato in css, vi starete chiedendo cosa è  # ( sharp ) . Il simbolo sharp viene usato per selezionare un elemento della pagina HTML con un determinato id.<span id="more-121"></span></p>
<p>La prima regola che abbiamo scritto è :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Arial</span><span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<ol>
<li>Con il selettore &#8216;body&#8217; , diciamo al browser , che le regole dichiarate all&#8217;interno delle parentesi graffe , valgono solo per il tag body.</li>
<li>Dichiariamo che il margine dell&#8217;elemento è uguale a 0</li>
<li>Dichiariamo che lo spazio tra bordo elemento e contenuto è uguale a 0</li>
<li>Diciamo di usare il font Arial per i testi</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#conteiner</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">999px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<ol>
<li>Conteiner è l&#8217;id che abbiamo attribuito al div principale</li>
<li>Impostiamo larghezza uguale a 999px</li>
<li>Impostiamo margine superiore e inferiore a zero e i margini laterali dinamici.  Impostando i margini laterali in dinamici, il div si centra dinamicamente nella pagina.</li>
<li>Dichiariamo un padding di 30 px per i bordi laterali</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#header</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<ol>
<li>Selezioniamo l&#8217;elemento con l&#8217;id header</li>
<li>Impostiamo un padding superiore e inferiore uguale a 40 px</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#header</span> <span style="color: #cc00cc;">#logo</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">30px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">,</span> Times<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">36px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#3C3C30</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#CCCCCC</span><span style="color: #00AA00;">;</span></pre></div></div>

<ol>
<li>Selezioniamo l&#8217;elemento logo che si trova all&#8217;interno dell&#8217;elemento header</li>
<li>Spostiamo l&#8217;elemento a sinistra</li>
<li>Impostiamo un padding di 30 px per il lato destro</li>
<li>Usiamo un font-family Times New Roman</li>
<li>Dichiariamo che il testo deve essere a 36px</li>
<li>Impostiamo il colore del testo in #3c3c30</li>
<li>Il bordo destro deve essere di 1px di colore #cccccc. Solid è il tipo di bordo.</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#header</span> <span style="color: #cc00cc;">#slogan</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<ol>
<li>Selezioniamo l&#8217;elemento slogan , all&#8217;interno dell&#8217;elemento header</li>
<li>Spostiamo l&#8217;elemento a sinistra</li>
<li>Impostiamo padding superiore a 15px e padding laterale sinistro a 30px</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#header</span> <span style="color: #cc00cc;">#logo</span> em<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#69950F</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<ol>
<li>Selezioniamo il tag em</li>
<li>Impostiamo il seguente colore : #69950f</li>
</ol>
<p>Per chi non conosce il css , seguire i commenti, puo&#8217; essere certamente utile , ma è consigliabile la lettura di una guida .</p>
<p>Ecco la migliore in circolazione : <a href="http://css.html.it/guide/leggi/2/guida-css-di-base/">Guida css di base</a></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 1678px; width: 1px; height: 1px;">http://css.html.it/guide/leggi/2/guida-css-di-base/</div>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/html/guida-alla-realizzazione-di-un-theme-wordpress-%e2%80%93-parte-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guida alla realizzazione di un Theme WordPress &#8211; Parte 2</title>
		<link>http://www.iosmanetto.it/html/convertire-e-adattare-theme-wordpress-2/</link>
		<comments>http://www.iosmanetto.it/html/convertire-e-adattare-theme-wordpress-2/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 16:30:59 +0000</pubDate>
		<dc:creator>Gregorio</dc:creator>
				<category><![CDATA[Css]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[conversione]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iosmanetto.it/?p=74</guid>
		<description><![CDATA[Indice guida - Introduzione - Convertiamo header La grafica che convertiremo passo passo è la seguente  My Easy Theme Si tratta , come accennato nell&#8217;articolo precedente, di una grafica molto semplice , studiata per chi non è tanto pratico . Un layout grafico, per buona regola,  si divide in tre parti : header , contenuto [...]]]></description>
			<content:encoded><![CDATA[<p><em>Indice guida<br />
</em></p>
<ol>
<li><em>- <a href="http://www.iosmanetto.it/php/convertire-e-convertire-e-adattare-theme-wordpress/">Introduzione</a></em></li>
<li><em>- Convertiamo header<br />
</em></li>
</ol>
<p>La grafica che convertiremo passo passo è la seguente  <a href="http://www.iosmanetto.it/wp-content/uploads/2009/12/easyTheme.png">My Easy Theme</a></p>
<p>Si tratta , come accennato nell&#8217;articolo precedente, di una grafica molto semplice , studiata per chi non è tanto pratico .</p>
<p>Un layout grafico, per buona regola,  si divide in tre parti : header , contenuto centrale e footer. La <strong>header </strong>è quella parte del sito, fissa in alto, composta da un logo e da un menu . Il <strong>contenuto</strong>, sono i testi centrali di ogni pagina. Invece il <strong>footer </strong>, è quella parte fissa in basso che contiene il copyright.</p>
<p>Oggi convertiamo la header del nostro theme.</p>
<p><img class="aligncenter size-full wp-image-88" title="easyThemeHeader" src="http://www.iosmanetto.it/wp-content/uploads/2009/12/easyThemeHeader3.jpg" alt="" width="479" height="62" /> Creiamo la pagina <em>index.html</em> , il file <em>style.css</em> e la cartella <em>images</em> .<span id="more-74"></span></p>
<p>Nel file style.css inseriamo il seguente codice :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Arial</span><span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#conteiner</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">999px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span> <span style="color: #cc00cc;">#logo</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">30px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">,</span> Times<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">36px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#3C3C30</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#CCCCCC</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span> <span style="color: #cc00cc;">#slogan</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span> <span style="color: #cc00cc;">#logo</span> em<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#69950F</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Nel file index.html</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&amp;lt;!DOCTYPE html PUBLIC &quot;&amp;gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;
&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;gt;
&amp;lt;title&amp;gt;Documento senza titolo&amp;lt;/title&amp;gt;
&amp;lt;style type=&quot;text/css&quot;&amp;gt;
@import &quot;style.css&quot;;
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div id=&quot;conteiner&quot;&amp;gt;
 &amp;lt;div id=&quot;header&quot;&amp;gt;
 &amp;lt;div id=&quot;logo&quot;&amp;gt;My &amp;lt;em&amp;gt;first&amp;lt;/em&amp;gt; theme&amp;lt;/div&amp;gt;
 &amp;lt;div id=&quot;slogan&quot;&amp;gt;Qui slogon wordpress&amp;lt;/div&amp;gt;
 &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;</pre></div></div>

<p>Mentre convertivo, ho registrato ogni singolo movimenti nel video qui sotto. Nel prossimo articolo cercheremo di commentare ogni riga di codice .<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="515" height="405" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/kAwIWnWqBt8&amp;hl=it_IT&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="515" height="405" src="http://www.youtube.com/v/kAwIWnWqBt8&amp;hl=it_IT&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iosmanetto.it/html/convertire-e-adattare-theme-wordpress-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.iosmanetto.it/wp-content/uploads/2009/12/p.avi" length="1984000" type="video/x-msvideo" />
		</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>

