<?xml version="1.0" encoding="ISO-8859-1"?>
<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>sastgroup.com &#187; script php</title>
	<atom:link href="http://www.sastgroup.com/category/script-php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sastgroup.com</link>
	<description>Tutorials guide scripts web tool</description>
	<lastBuildDate>Wed, 19 Jun 2013 11:00:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>[PHP - WordPress] Rimuovere tutti gli shortcodes dal contenuto di un post</title>
		<link>http://www.sastgroup.com/tutorials/php-wordpress-rimuovere-tutti-gli-shortcodes-dal-contenuto-di-un-post</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordpress-rimuovere-tutti-gli-shortcodes-dal-contenuto-di-un-post#comments</comments>
		<pubDate>Wed, 05 Jun 2013 11:00:59 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=12141</guid>
		<description><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tuttorial di oggi vedremo come rimuovere tutti gli shortcodes dal contenuto di un post.<br />
Aggiungete il seguente snippet all'interno del file functions.php.</p>
<pre class="php">&#160;
<span style="color: #000000; font-weight: bold;">function</span> remove_shortcode_from_index<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$content</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> is_home<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0000ff;">$content</span> = strip_shortcodes<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$content</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$content</span>;
<span style="color: #66cc66;">&#125;</span>
add_filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'the_content'</span>, <span style="color: #ff0000;">'remove_shortcode_from_index'</span><span style="color: #66cc66;">&#41;</span>;
&#160;&#8230;</pre>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tuttorial di oggi vedremo come rimuovere tutti gli shortcodes dal contenuto di un post.<br />
Aggiungete il seguente snippet all'interno del file functions.php.</p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> remove_shortcode_from_index<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$content</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> is_home<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0000ff;">$content</span> = strip_shortcodes<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$content</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$content</span>;
<span style="color: #66cc66;">&#125;</span>
add_filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'the_content'</span>, <span style="color: #ff0000;">'remove_shortcode_from_index'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordpress-rimuovere-tutti-gli-shortcodes-dal-contenuto-di-un-post/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP - WordPress] Creare uno short code &#8220;Seguimi su Twitter&#8221;</title>
		<link>http://www.sastgroup.com/tutorials/php-wordpress-creare-uno-short-code-seguimi-su-twitter</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordpress-creare-uno-short-code-seguimi-su-twitter#comments</comments>
		<pubDate>Fri, 10 May 2013 11:00:47 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=16682</guid>
		<description><![CDATA[&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tutorial di oggi vi mostreremo come creare uno short code "Seguimi su Twitter" che permetterà di aggiungere facilmente sul vostro post/pagina il pulsante che invita gli utenti di seguirvi su Twitter.</p>
<pre class="php">&nbsp;
add_shortcode<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'twitter'</span>, <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$atts</span>,<span style="color: #0000ff;">$content</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	 <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> !<a href="http://www.php.net/isset"><span style="color: #000066;">isset</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$atts</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'username'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0000ff;">$atts</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'username'</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">'VeronicaDjeneva'</span>;
	<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <a href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$content</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0000ff;">$content</span> = <span style="color: #ff0000;">'Follow me on Twitter'</span>;
	 <span style="color: #b1b100;">return</span> <span style="color: #ff0000;">'&lt;a href=&quot;http://twitter.com/'</span> .<span style="color: #0000ff;">$atts</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'username'</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #ff0000;">'&quot;&gt;'</span> .<span style="color: #0000ff;">$content</span>.<span style="color: #ff0000;">'&lt;/a&gt;'</span>;
<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordpress-creare-uno-short-code-seguimi-su-twitter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP - WordPress] Proteggere le vostre immagini dagli hotlink</title>
		<link>http://www.sastgroup.com/tutorials/php-wordpress-proteggere-le-vostre-immagini-dagli-hotlink</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordpress-proteggere-le-vostre-immagini-dagli-hotlink#comments</comments>
		<pubDate>Thu, 25 Apr 2013 11:00:16 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[sicurezza]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=16474</guid>
		<description><![CDATA[&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/htaccess_logo.jpg"><img src="http://www.sastgroup.com/images/htaccess_logo.jpg" alt="" title="htaccess_logo" width="550" height="200" class="alignnone size-full wp-image-5802" /></a></p>
<p>Molti scrapers usano i feed RSS per mostrare i vostri articoli sul loro sito. Ciò significa che usano anche le vostre immagini e di conseguenza consumano  banda.<br />
Per difendere le immagini dagli hotlink non dovete fare altro che copiare il codice qui sotto e incollarlo all'interno del file .htaccess presente nella root del vostro blog WordPress.</p>
<pre class="php">&nbsp;
RewriteEngine On
<span style="color: #808080; font-style: italic;">#Replace ?mysite\.com/ with your blog url</span>
RewriteCond %<span style="color: #66cc66;">&#123;</span>HTTP_REFERER<span style="color: #66cc66;">&#125;</span> !^http:<span style="color: #808080; font-style: italic;">//(.+\.)?mysite\.com/ [NC]</span>
RewriteCond %<span style="color: #66cc66;">&#123;</span>HTTP_REFERER<span style="color: #66cc66;">&#125;</span> !^$
<span style="color: #808080; font-style: italic;">#Replace /images/nohotlink.jpg with your &quot;don't hotlink&quot; image url</span>
RewriteRule .*\.<span style="color: #66cc66;">&#40;</span>jpe?g|gif|bmp|png<span style="color: #66cc66;">&#41;</span>$ /images/nohotlink.jpg <span style="color: #66cc66;">&#91;</span>L<span style="color: #66cc66;">&#93;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordpress-proteggere-le-vostre-immagini-dagli-hotlink/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[PHP-WordPress] Aggiungere automaticamente un link nel titolo di un post</title>
		<link>http://www.sastgroup.com/tutorials/php-wordpress-aggiungere-automaticamente-un-link-nel-titolo-di-un-post</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordpress-aggiungere-automaticamente-un-link-nel-titolo-di-un-post#comments</comments>
		<pubDate>Wed, 24 Apr 2013 11:00:42 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=16463</guid>
		<description><![CDATA[&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Le persone che usano strumenti automatici di scraping di contenuti, riescono ad ottenere i vostri articoli in modo completo salvando il titolo, le immagini e la descrizione.<br />
Un buon modo per scoraggiare gli scrapers è quello di aggiungere un link nel titolo del vostro post, in questo modo ogni post rubato si collegherà automaticamente al tuo post originale.</p>
<p>Incollate il seguente codice all'interno del file single.php del vostro tema WordPress:</p>
<pre class="php">&nbsp;
&lt;h1&gt;
  &lt;a href=<span style="color: #ff0000;">&quot;&lt;?php the_permalink(); ?&gt;&quot;</span>&gt;&lt; ?php the_title<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; ?&gt;&lt;/a&gt;
&lt;/h1&gt;
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordpress-aggiungere-automaticamente-un-link-nel-titolo-di-un-post/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP - WordPress] Come cercare solo all&#8217;interno di una tipologia di post</title>
		<link>http://www.sastgroup.com/tutorials/php-wordpress-come-cercare-solo-allinterno-di-una-tipologia-di-post</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordpress-come-cercare-solo-allinterno-di-una-tipologia-di-post#comments</comments>
		<pubDate>Fri, 19 Apr 2013 11:00:38 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=16399</guid>
		<description><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Se volete forzare la ricerca solo all'interno di una specifica tipologia di post, ecco la soluzione! Incollate il codice qui sotto all'interno del file functions.php del vostro tema WordPress.</p>
<pre class="php">&#160;
<span style="color: #000000; font-weight: bold;">function</span> SearchFilter<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$query</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$query</span>-&#62;<span style="color: #006600;">is_search</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// Insert the specific post type you want to search</span>
    <span style="color: #0000ff;">$query</span>-&#62;<span style="color: #006600;">set</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'post_type'</span>, <span style="color: #ff0000;">'feeds'</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$query</span>;
<span style="color: #66cc66;">&#125;</span>
&#160;
<span style="color: #808080; font-style: italic;">// This filter will jump into the loop and arrange our results before they're returned</span>
add_filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'pre_get_posts'</span>,<span style="color: #ff0000;">'SearchFilter'</span><span style="color: #66cc66;">&#41;</span>;
&#160;</pre>
<p>Ricordatevi di cambiare la tipologia del post alla riga 4.&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Se volete forzare la ricerca solo all'interno di una specifica tipologia di post, ecco la soluzione! Incollate il codice qui sotto all'interno del file functions.php del vostro tema WordPress.</p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> SearchFilter<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$query</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$query</span>-&gt;<span style="color: #006600;">is_search</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// Insert the specific post type you want to search</span>
    <span style="color: #0000ff;">$query</span>-&gt;<span style="color: #006600;">set</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'post_type'</span>, <span style="color: #ff0000;">'feeds'</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$query</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// This filter will jump into the loop and arrange our results before they're returned</span>
add_filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'pre_get_posts'</span>,<span style="color: #ff0000;">'SearchFilter'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
<p>Ricordatevi di cambiare la tipologia del post alla riga 4.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordpress-come-cercare-solo-allinterno-di-una-tipologia-di-post/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP - WordPress] Limitare i post per pagina nei risultati di ricerca</title>
		<link>http://www.sastgroup.com/tutorials/php-wordpress-limitare-i-post-per-pagina-nei-risultati-di-ricerca</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordpress-limitare-i-post-per-pagina-nei-risultati-di-ricerca#comments</comments>
		<pubDate>Sun, 14 Apr 2013 11:00:44 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=16343</guid>
		<description><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tutorial di oggi imparerete come limitare i post per pagina nei risultati di ricerca del vostro blog WordPress.</p>
<p>Copiate e incollate il seguente codice all'interno del file functions.php del vostro tema:</p>
<pre class="php">&#160;
<span style="color: #000000; font-weight: bold;">function</span> limit_posts_per_search_page<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> is_search<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>
		set_query_var<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'posts_per_archive_page'</span>, <span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&#160;
add_filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'pre_get_posts'</span>, <span style="color: #ff0000;">'limit_posts_per_search_page'</span><span style="color: #66cc66;">&#41;</span>;
&#160;&#8230;</pre>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tutorial di oggi imparerete come limitare i post per pagina nei risultati di ricerca del vostro blog WordPress.</p>
<p>Copiate e incollate il seguente codice all'interno del file functions.php del vostro tema:</p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> limit_posts_per_search_page<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> is_search<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>
		set_query_var<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'posts_per_archive_page'</span>, <span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
add_filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'pre_get_posts'</span>, <span style="color: #ff0000;">'limit_posts_per_search_page'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordpress-limitare-i-post-per-pagina-nei-risultati-di-ricerca/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP-WordPress] Redirect al primo post se ne è stato trovato solo uno</title>
		<link>http://www.sastgroup.com/tutorials/php-wordpress-redirect-al-primo-post-se-ne-e-stato-trovato-solo-uno</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordpress-redirect-al-primo-post-se-ne-e-stato-trovato-solo-uno#comments</comments>
		<pubDate>Thu, 11 Apr 2013 11:00:40 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=16312</guid>
		<description><![CDATA[&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tutorial di oggi vi mostreremo come effettuare un redirect al primo post se tra i risultati di ricerca ne è stato trovato uno solo.</p>
<p>Incollate il seguente codice all'interno del file functions.php.</p>
<pre class="php">&nbsp;
add_action<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'template_redirect'</span>, <span style="color: #ff0000;">'redirect_single_post'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">function</span> redirect_single_post<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>is_search<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <a href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$wp_query</span>;
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$wp_query</span>-&gt;<span style="color: #006600;">post_count</span> == <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            wp_redirect<span style="color: #66cc66;">&#40;</span> get_permalink<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$wp_query</span>-&gt;<span style="color: #006600;">posts</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'0'</span><span style="color: #66cc66;">&#93;</span>-&gt;<span style="color: #006600;">ID</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordpress-redirect-al-primo-post-se-ne-e-stato-trovato-solo-uno/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP - WordPress] Controllare se una pagina è una figlia e un genitore</title>
		<link>http://www.sastgroup.com/tutorials/php-wordpress-controllare-se-una-pagina-e-una-figlia-e-un-genitore</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordpress-controllare-se-una-pagina-e-una-figlia-e-un-genitore#comments</comments>
		<pubDate>Wed, 06 Feb 2013 11:00:24 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=15578</guid>
		<description><![CDATA[&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tutorial di oggi creeremo 2 funzioni che ci permetteranno di conoscere se una pagina è figlia di un'altra pagina oppure se è un genitore.<br />
Inserite il seguente codice all'interno del file functions.php del vostro tema WordPress.</p>
<pre class="php">&nbsp;
<span style="color: #808080; font-style: italic;">// Check if page is direct child</span>
<span style="color: #000000; font-weight: bold;">function</span> is_child<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$page_id</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <a href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$post</span>;
    <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> is_page<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> &amp;&amp; <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$post</span>-&gt;<span style="color: #006600;">post_parent</span> == <span style="color: #0000ff;">$page_id</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
       <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span>;
    <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
       <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// Check if page is an ancestor</span>
<span style="color: #000000; font-weight: bold;">function</span> is_ancestor<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$post_id</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <a href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$wp_query</span>;
    <span style="color: #0000ff;">$ancestors</span> = <span style="color: #0000ff;">$wp_query</span>-&gt;<span style="color: #006600;">post</span>-&gt;<span style="color: #006600;">ancestors</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <a href="http://www.php.net/in_array"><span style="color: #000066;">in_array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$post_id</span>, <span style="color: #0000ff;">$ancestors</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span>;
    <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordpress-controllare-se-una-pagina-e-una-figlia-e-un-genitore/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP - Wordoress] Come rimuovere larghezza/altezza da una miniatura</title>
		<link>http://www.sastgroup.com/tutorials/php-wordoress-come-rimuovere-larghezzaaltezza-da-una-miniatura</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordoress-come-rimuovere-larghezzaaltezza-da-una-miniatura#comments</comments>
		<pubDate>Tue, 22 Jan 2013 11:00:20 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=15398</guid>
		<description><![CDATA[&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tutorial di oggi vi mostreremo come togliere i tag HTML "width" e "height" da una miniatura WordPress in modo da renderli più gestibili dai CSS.<br />
Questo script potrebbe ritornarvi molto utile se desiderate creare un layout responsive.</p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> remove_image_dim_attr<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$html</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #0000ff;">$html</span>=<a href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'/width=([&quot;<span style="color: #000099; font-weight: bold;">\'</span>])(.*?)<span style="color: #000099; font-weight: bold;">\1</span>/'</span>, <span style="color: #ff0000;">''</span>, <span style="color: #0000ff;">$html</span> <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0000ff;">$html</span>=<a href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'/height=([&quot;<span style="color: #000099; font-weight: bold;">\'</span>])(.*?)<span style="color: #000099; font-weight: bold;">\1</span>/'</span>, <span style="color: #ff0000;">''</span>, <span style="color: #0000ff;">$html</span> <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$html</span>;
        <span style="color: #66cc66;">&#125;</span>
        add_filter<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'get_image_tag'</span>,<span style="color: #ff0000;">'remove_image_dim_attr'</span> <span style="color: #66cc66;">&#41;</span>;
        add_filter<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'image_send_to_editor'</span>,<span style="color: #ff0000;">'remove_image_dim_attr'</span> <span style="color: #66cc66;">&#41;</span>;
        add_filter<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'post_thumbnail_html'</span>,<span style="color: #ff0000;">'remove_image_dim_attr'</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordoress-come-rimuovere-larghezzaaltezza-da-una-miniatura/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP - WordPress] Ottenere un feed RSS e visualizzare i record con un loop</title>
		<link>http://www.sastgroup.com/tutorials/php-wordpress-ottenere-un-feed-rss-e-visualizzare-i-record-con-un-loop</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordpress-ottenere-un-feed-rss-e-visualizzare-i-record-con-un-loop#comments</comments>
		<pubDate>Thu, 10 Jan 2013 11:00:39 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=15251</guid>
		<description><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tutorial di oggi imparerete come ottenere un feed RSS e visualizzare i record con un ciclo.</p>
<pre class="php">&#160;
&#60; ?php
<span style="color: #b1b100;">include_once</span><span style="color: #66cc66;">&#40;</span>ABSPATH . WPINC . <span style="color: #ff0000;">'/rss.php'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0000ff;">$feed</span> = <span style="color: #ff0000;">'http://dangayle.com/feed/'</span>;
<span style="color: #0000ff;">$rss</span> = fetch_feed<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$feed</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!is_wp_error<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$rss</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> :
        <span style="color: #0000ff;">$maxitems</span> = <span style="color: #0000ff;">$rss</span>-&#62;<span style="color: #006600;">get_item_quantity</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$rss_items</span> = <span style="color: #0000ff;">$rss</span>-&#62;<span style="color: #006600;">get_items</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #0000ff;">$maxitems</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$rss_items</span><span style="color: #66cc66;">&#41;</span>:
        <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&#34;
&#60;ul&#62;<span style="color: #000099; font-weight: bold;">\n</span>&#34;</span>;
        <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$rss_items</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$item</span> <span style="color: #66cc66;">&#41;</span> :
            <span style="color: #808080; font-style: italic;">//instead of a bunch of string concatenation or echoes, I prefer the terseness of printf</span>
            <span style="color: #808080; font-style: italic;">//(http://php.net/manual/en/function.printf.php)</span>
            <a href="http://www.php.net/printf"><span style="color: #000066;">printf</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'
&#60;li&#62;&#60;a href=&#34;%s&#34;&#62;%s&#60;/a&#62;
&#160;
%s
&#60;/li&#62;
</span>&#8230;</pre>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tutorial di oggi imparerete come ottenere un feed RSS e visualizzare i record con un ciclo.</p>
<pre class="php">&nbsp;
&lt; ?php
<span style="color: #b1b100;">include_once</span><span style="color: #66cc66;">&#40;</span>ABSPATH . WPINC . <span style="color: #ff0000;">'/rss.php'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0000ff;">$feed</span> = <span style="color: #ff0000;">'http://dangayle.com/feed/'</span>;
<span style="color: #0000ff;">$rss</span> = fetch_feed<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$feed</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!is_wp_error<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$rss</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> :
        <span style="color: #0000ff;">$maxitems</span> = <span style="color: #0000ff;">$rss</span>-&gt;<span style="color: #006600;">get_item_quantity</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$rss_items</span> = <span style="color: #0000ff;">$rss</span>-&gt;<span style="color: #006600;">get_items</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #0000ff;">$maxitems</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$rss_items</span><span style="color: #66cc66;">&#41;</span>:
        <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;
&lt;ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
        <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$rss_items</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$item</span> <span style="color: #66cc66;">&#41;</span> :
            <span style="color: #808080; font-style: italic;">//instead of a bunch of string concatenation or echoes, I prefer the terseness of printf</span>
            <span style="color: #808080; font-style: italic;">//(http://php.net/manual/en/function.printf.php)</span>
            <a href="http://www.php.net/printf"><span style="color: #000066;">printf</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'
&lt;li&gt;&lt;a href=&quot;%s&quot;&gt;%s&lt;/a&gt;
&nbsp;
%s
&lt;/li&gt;
&nbsp;
'</span>,<span style="color: #0000ff;">$item</span>-&gt;<span style="color: #006600;">get_permalink</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #0000ff;">$item</span>-&gt;<span style="color: #006600;">get_title</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #0000ff;">$item</span>-&gt;<span style="color: #006600;">get_description</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #b1b100;">endforeach</span>;
        <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;&lt;/ul&gt;
&nbsp;
<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
    <span style="color: #b1b100;">endif</span>;
<span style="color: #b1b100;">endif</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordpress-ottenere-un-feed-rss-e-visualizzare-i-record-con-un-loop/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP - WordPress] Ottenere l&#8217;ID della pagina da uno slug</title>
		<link>http://www.sastgroup.com/tutorials/php-wordpress-ottenere-lid-della-pagina-da-uno-slug</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordpress-ottenere-lid-della-pagina-da-uno-slug#comments</comments>
		<pubDate>Mon, 10 Dec 2012 11:00:44 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=14934</guid>
		<description><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>In questo semplice tutorial WordPress vi mostreremo come creare una funzione che restituisce l'ID della pagina passando come parametro uno slug.</p>
<pre class="php">&#160;
<span style="color: #000000; font-weight: bold;">function</span> get_page_id<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$name</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<a href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$wpdb</span>;
	<span style="color: #808080; font-style: italic;">// get page id using custom query</span>
	<span style="color: #0000ff;">$page_id</span> = <span style="color: #0000ff;">$wpdb</span>-&#62;<span style="color: #006600;">get_var</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#34;SELECT ID FROM $wpdb-&#62;posts WHERE ( post_name = '&#34;</span>.<span style="color: #0000ff;">$name</span>.<span style="color: #ff0000;">&#34;' or post_title = '&#34;</span>.<span style="color: #0000ff;">$name</span>.<span style="color: #ff0000;">&#34;' ) and post_status = 'publish' and
									post_type='page' &#34;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$page_id</span>;
<span style="color: #66cc66;">&#125;</span>
&#160;&#8230;</pre>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>In questo semplice tutorial WordPress vi mostreremo come creare una funzione che restituisce l'ID della pagina passando come parametro uno slug.</p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> get_page_id<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$name</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<a href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$wpdb</span>;
	<span style="color: #808080; font-style: italic;">// get page id using custom query</span>
	<span style="color: #0000ff;">$page_id</span> = <span style="color: #0000ff;">$wpdb</span>-&gt;<span style="color: #006600;">get_var</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;SELECT ID FROM $wpdb-&gt;posts WHERE ( post_name = '&quot;</span>.<span style="color: #0000ff;">$name</span>.<span style="color: #ff0000;">&quot;' or post_title = '&quot;</span>.<span style="color: #0000ff;">$name</span>.<span style="color: #ff0000;">&quot;' ) and post_status = 'publish' and
									post_type='page' &quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$page_id</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordpress-ottenere-lid-della-pagina-da-uno-slug/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP - WordPress] Come visualizzare i vostri tweet preferiti</title>
		<link>http://www.sastgroup.com/tutorials/php-wordpress-come-visualizzare-i-vostri-tweet-preferiti</link>
		<comments>http://www.sastgroup.com/tutorials/php-wordpress-come-visualizzare-i-vostri-tweet-preferiti#comments</comments>
		<pubDate>Fri, 30 Nov 2012 11:00:08 +0000</pubDate>
		<dc:creator>daniele</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sastgroup.com/?p=14820</guid>
		<description><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tutorial di oggi imparerete come mostrare i vostri tweet preferiti sul vostro blog WordPress.<br />
Incollate il seguente codice nella posizione in cui volete mostrare i tweet. Non dimenticate di modificare l'url alla riga 3.&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sastgroup.com/images/logo_php.jpg"><img src="http://www.sastgroup.com/images/logo_php.jpg" alt="" title="logo_php" width="550" height="200" class="alignnone size-full wp-image-5684" /></a></p>
<p>Nel tutorial di oggi imparerete come mostrare i vostri tweet preferiti sul vostro blog WordPress.<br />
Incollate il seguente codice nella posizione in cui volete mostrare i tweet. Non dimenticate di modificare l'url alla riga 3.</p>
<pre lang="php>
< ?php
    include_once(ABSPATH . WPINC . '/feed.php');
    $rss = fetch_feed('http://twitter.com/favorites/123456.rss');
    $maxitems = $rss->get_item_quantity(3);
    $rss_items = $rss->get_items(0, $maxitems);
?>
<ul>
    < ?php if ($maxitems == 0) echo '
<li>No items.';
    else
    // Loop through each feed item and display each item as a hyperlink.
    foreach ( $rss_items as $item ) : ?>
<li>
        <a href='<?php echo $item->get_permalink(); ?>'>
            < ?php echo $item->get_title(); ?>
        </a>
    </li>

    < ?php endforeach; ?>
</ul>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sastgroup.com/tutorials/php-wordpress-come-visualizzare-i-vostri-tweet-preferiti/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
