<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Codice per post random]]></title><description><![CDATA[<p dir="auto">Ciao e buon anno a tutti.<br />
Approfittando del tempo libero permesso dalle feste, ho spostato il mio blog da <a href="http://Wordpress.com" rel="nofollow ugc">Wordpress.com</a> al dominio <a href="http://tarantulailblog.it" rel="nofollow ugc">tarantulailblog.it</a>. Ho installato il tema "cover".<br />
Come potete vedere, nella home c'è un riquadro coi post recenti più letti. Mi interessa poco, anche perché poco più giù c'è l'indice dei post recenti, e i più letti ci sono dentro.<br />
Mi piacerebbe piuttosto che nel riquadro uscissero 3 post a caso, per recuperare quelli vecchi e dimenticati.<br />
Non voglio usare i plugin vari che mi danno i post random in homepage, perché non li voglio nell'indice della home, ma in quel preciso riquadro.<br />
Ho cercato di modificare il codice per far uscire i post a caso anziché quelli "popolari", ma non mi viene fuori niente di buono :bho:<br />
Vi riporto qui il codice che trovo sulla pagina home.php relativamente a quel box: chi mi saprebbe suggerire come fare la modifica di cui ho bisogno?<br />
Grazie e auguri ancora!<br />
Massimo</p>
<p dir="auto">&lt;?php<br />
if ( (get_bloginfo('version') &gt;= 2.9) &amp;&amp; (get_option('cover_wp_popular') == 'comments') )<br />
{<br />
query_posts("caller_get_posts=1&amp;showposts=3&amp;orderby=comment_count "); $i = 1; ?&gt;<br />
&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;<br />
&lt;?php $words = 17;<br />
$content = get_the_excerpt();<br />
$excerpt = explode(' ',$content); ?&gt;<br />
&lt;div class="spost"&gt;<br />
&lt;h2&gt;&lt;a href="&lt;?php echo the_permalink(); ?&gt;" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;<br />
&lt;?php<br />
$words = display_thumbnail(95,80,$words,15);<br />
if(count($excerpt) &gt; $words) $count = $words;<br />
else $count = count($excerpt); ?&gt;<br />
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '…'; ?&gt; &lt;a href="&lt;?php echo get_permalink($post-&gt;ID) ?&gt;"&gt;&lt;?php _e('Continua','cover-wp') ?&gt; »&lt;/a&gt;&lt;/p&gt;</p>
]]></description><link>https://dev.connect.gt/topic/142252/codice-per-post-random</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 21:07:44 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/142252.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Jan 2011 14:09:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 20:24:30 GMT]]></title><description><![CDATA[<p dir="auto">Splendido, grazie!<br />
Può essere che a forza di smanettare avevo danneggiato qualcosa nel file... boh?<br />
Grazie molte,<br />
Massimo</p>
]]></description><link>https://dev.connect.gt/post/962435</link><guid isPermaLink="true">https://dev.connect.gt/post/962435</guid><dc:creator><![CDATA[maxgiuliani]]></dc:creator><pubDate>Sat, 01 Jan 2011 20:24:30 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 19:17:44 GMT]]></title><description><![CDATA[<p dir="auto">Ho provato in locale e con questo codice funziona:</p>
<pre><code>&lt;?php get_header(); ?&gt;
    &lt;div id="content"&gt;
      &lt;div id="center"&gt;
	    &lt;?php if((!is_paged()) &amp;&amp; (get_option('cover_wp_fp_layout', 'magazine') == 'magazine')) { ?&gt;
        &lt;?php $sticky = get_option('sticky_posts'); $args = array('post__in' =&gt; $sticky); ?&gt;
        &lt;?php query_posts($args); ?&gt;
        &lt;?php if((have_posts()) &amp;&amp; (!empty($sticky))) : ?&gt;
        &lt;div id="sticky"&gt;
          &lt;h3&gt;&lt;?php _e('Announcements','cover-wp') ?&gt;&lt;/h3&gt;
        &lt;?php while(have_posts()) : the_post(); ?&gt;
        &lt;?php $words = 75;
              $content = get_the_excerpt();
	          $excerpt = explode(' ',$content); ?&gt;
            &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
            &lt;p class="postmeta" style="margin-bottom:2px;"&gt;&lt;?php the_time(__('F jS, Y','cover-wp')); ?&gt; | &lt;?php comments_popup_link(__('Add a Comment','cover-wp'), __('1 Comment','cover-wp'), __('% Comments','cover-wp')); ?&gt;&lt;/p&gt;
            &lt;div class="the_content"&gt;
              &lt;?php
				$words = display_thumbnail(230,165,$words,55);
			    if(count($excerpt) &gt; $words) $count = $words;
				else $count = count($excerpt); ?&gt;
              &lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '&amp;#8230;'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Read entire article','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
            &lt;/div&gt;&lt;!-- /the_content --&gt;
        &lt;?php endwhile; ?&gt;
        &lt;/div&gt;&lt;!-- /sticky --&gt;
        &lt;?php endif; ?&gt;
        &lt;?php wp_reset_query(); ?&gt;
        &lt;div id="headline"&gt;
          &lt;h3&gt;&lt;?php _e('Headline','cover-wp') ?&gt;&lt;/h3&gt;
          &lt;?php query_posts("caller_get_posts=1&amp;showposts=1"); $i = 1; ?&gt;
          &lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
            &lt;?php $words = 75;
              $content = get_the_excerpt();
	          $excerpt = explode(' ',$content); ?&gt;
            &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
            &lt;p class="postmeta" style="margin-bottom:2px;"&gt;&lt;?php the_time(__('F jS, Y','cover-wp')); ?&gt; | &lt;?php comments_popup_link(__('Add a Comment','cover-wp'), __('1 Comment','cover-wp'), __('% Comments','cover-wp')); ?&gt;&lt;/p&gt;
            &lt;div class="the_content"&gt;
              &lt;?php
				$words = display_thumbnail(230,165,$words,55);
			    if(count($excerpt) &gt; $words) $count = $words;
				else $count = count($excerpt); ?&gt;
              &lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '&amp;#8230;'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Read entire article','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
            &lt;/div&gt;&lt;!-- /the_content --&gt;
          &lt;?php endwhile; ?&gt;
            &lt;?php wp_reset_query(); ?&gt;
          &lt;?php else: ?&gt;
            &lt;h2 class="center"&gt;&lt;?php _e('No Entries Found','cover-wp') ?&gt;&lt;/h2&gt;
            &lt;p class="center"&gt;&lt;?php _e('There are no entries in this blog.','cover-wp') ?&gt;&lt;/p&gt;
          &lt;?php endif; ?&gt;
        &lt;/div&gt;&lt;!-- /headline --&gt;
        &lt;div id="featured"&gt;
          &lt;h3&gt;&lt;?php _e('Featured','cover-wp') ?&gt;&lt;/h3&gt;
          &lt;?php query_posts("caller_get_posts=1&amp;showposts=3&amp;category_name=".get_option('cover_wp_featured_cat', 'Featured')); $i = 1; ?&gt;
          &lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
            &lt;?php $words = 17;
              $content = get_the_excerpt();
	          $excerpt = explode(' ',$content); ?&gt;
			  &lt;div class="spost"&gt;
                &lt;h2&gt;&lt;a href="&lt;?php echo the_permalink(); ?&gt;" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
              &lt;?php 
			    $words = display_thumbnail(95,80,$words,15);
				if(count($excerpt) &gt; $words) $count = $words;
				else $count = count($excerpt); ?&gt;
                &lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '&amp;#8230;'; ?&gt; &lt;a href="&lt;?php echo get_permalink($post-&gt;ID) ?&gt;"&gt;&lt;?php _e('Read more','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
              &lt;/div&gt;&lt;!-- /spost --&gt;
              &lt;div class="spbottom"&gt;&lt;/div&gt;
          &lt;?php endwhile; ?&gt;
		  &lt;?php else: ?&gt;
            &lt;h2 class="center"&gt;&lt;?php _e('No Featured Articles','cover-wp') ?&gt;&lt;/h2&gt;
            &lt;p class="center"&gt;&lt;?php _e('Create a category called &amp;quot;Featured&amp;quot;. Articles in that category will be shown here.','cover-wp') ?&gt;&lt;/p&gt;
          &lt;?php endif; ?&gt;
        &lt;/div&gt;&lt;!-- /featured --&gt;
        &lt;div id="popular"&gt;
          &lt;h3&gt;&lt;?php _e('Popular','cover-wp') ?&gt;&lt;/h3&gt;
          &lt;?php
			  query_posts(array('orderby' =&gt; 'rand', 'showposts' =&gt; 3)); ?&gt;

              &lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
                &lt;?php $words = 17;
                $content = get_the_excerpt();
	            $excerpt = explode(' ',$content); ?&gt;
			    &lt;div class="spost"&gt;
                  &lt;h2&gt;&lt;a href="&lt;?php echo the_permalink(); ?&gt;" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
                  &lt;?php
                    $words = display_thumbnail(95,80,$words,15);
					if(count($excerpt) &gt; $words) $count = $words;
					else $count = count($excerpt); ?&gt;
              &lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '&amp;#8230;'; ?&gt; &lt;a href="&lt;?php echo get_permalink($post-&gt;ID) ?&gt;"&gt;&lt;?php _e('Read more','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
                &lt;/div&gt;&lt;!-- /spost --&gt;
              &lt;div class="spbottom"&gt;&lt;/div&gt;
              &lt;?php endwhile; ?&gt;
		      &lt;?php else: ?&gt;
                &lt;h2 class="center"&gt;&lt;?php _e('No Featured Articles','cover-wp') ?&gt;&lt;/h2&gt;
                &lt;p class="center"&gt;&lt;?php _e('Select a category from the Options Page or create a category called &amp;quot;Featured&amp;quot;. Articles in that category will be shown here.','cover-wp') ?&gt;&lt;/p&gt;
              &lt;?php endif; ?&gt;
        &lt;/div&gt;&lt;!-- /popular --&gt;
        &lt;div id="latest"&gt;
          &lt;h3&gt;&lt;?php _e('Latest','cover-wp') ?&gt;&lt;/h3&gt;
		  &lt;?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
		    $ppp = get_option('posts_per_page');
			$ppp = $ppp - 1;
            query_posts("caller_get_posts=1&amp;paged=$page&amp;showposts=$ppp&amp;offset=1"); ?&gt;
          &lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
		    &lt;?php $words = 60;
              $content = get_the_excerpt();
	          $excerpt = explode(' ',$content); ?&gt;
            &lt;div class="spost"&gt;
              &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
              &lt;?php
                $words = display_thumbnail(150,105,$words,55);
				if(count($excerpt) &gt; $words) $count = $words;
				else $count = count($excerpt) ?&gt;
              &lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '&amp;#8230;'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Read entire article','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
            &lt;/div&gt;&lt;!-- /spost --&gt;
            &lt;div class="spbottom"&gt;&lt;/div&gt;
            &lt;?php endwhile; ?&gt;
			&lt;?php wp_reset_query(); ?&gt;
            &lt;div class="navigation"&gt;
		    &lt;?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } 
              else { ?&gt;
                &lt;div class="left"&gt;&lt;?php previous_posts_link(__('&amp;laquo; Previous Page','cover-wp')) ?&gt;&lt;/div&gt;
                &lt;div class="right"&gt;&lt;?php next_posts_link(__('Next Page &amp;raquo;','cover-wp') ) ?&gt;&lt;/div&gt;
              &lt;?php } ?&gt;
            &lt;/div&gt;
          &lt;?php else: ?&gt;
            &lt;h2 class="center"&gt;&lt;?php _e('No Entries Found','cover-wp') ?&gt;&lt;/h2&gt;
            &lt;p class="center"&gt;&lt;?php _e('There are no entries in this blog.','cover-wp') ?&gt;&lt;/p&gt;
          &lt;?php endif; ?&gt;
        &lt;/div&gt;&lt;!-- /latest --&gt;
        &lt;?php } else { ?&gt;
        &lt;div id="the_loop"&gt;
        &lt;p class="address"&gt;&lt;a href="&lt;?php echo home_url(); ?&gt;/" title="Home"&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt; &amp;raquo; &lt;?php _e('Archive','cover-wp') ?&gt;&lt;/p&gt;
        &lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
          &lt;div &lt;?php post_class(); ?&gt; id="post-&lt;?php the_ID(); ?&gt;"&gt;
            &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
            &lt;p class="postmeta"&gt;&lt;?php the_time(__('F jS, Y','cover-wp')); ?&gt; | &lt;?php comments_popup_link(__('Add a Comment','cover-wp'), __('1 Comment','cover-wp'), __('% Comments','cover-wp')); ?&gt;&lt;/p&gt;
            &lt;div class="the_content"&gt;
              &lt;?php $words = 75;
                $content = get_the_excerpt();
	            $excerpt = explode(' ',$content); ?&gt;
              &lt;?php
                $words = display_thumbnail(230,165,$words,55);
				if(count($excerpt) &gt; $words) $count = $words;
				else $count = count($excerpt) ?&gt;
              &lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '&amp;#8230;'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Read entire article','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
            &lt;/div&gt;&lt;!-- /the_content --&gt;
            &lt;p class="details"&gt;&lt;?php _e('Filed under:','cover-wp') ?&gt; &lt;?php the_category(', '); edit_post_link(__('Edit','cover-wp'), ' &amp;middot; ', ''); ?&gt;&lt;/p&gt;
          &lt;/div&gt;&lt;!-- /post --&gt;
        &lt;?php endwhile; ?&gt;
        &lt;div class="navigation"&gt;
		  &lt;?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } 
            else { ?&gt;
              &lt;div class="left"&gt;&lt;?php previous_posts_link(__('&amp;laquo; Previous Page','cover-wp')) ?&gt;&lt;/div&gt;
              &lt;div class="right"&gt;&lt;?php next_posts_link(__('Next Page &amp;raquo;','cover-wp')) ?&gt;&lt;/div&gt;
            &lt;?php } ?&gt;
        &lt;/div&gt;
        &lt;?php else: ?&gt;
          &lt;h2 class="center"&gt;&lt;?php _e('No Entries Found','cover-wp') ?&gt;&lt;/h2&gt;
          &lt;p class="center"&gt;&lt;?php _e('There are no entries in this blog.','cover-wp') ?&gt;&lt;/p&gt;
      &lt;?php endif; ?&gt;
        &lt;/div&gt;&lt;!-- /the_loop --&gt;
        &lt;?php } ?&gt;
      &lt;/div&gt;&lt;!-- /center --&gt;
&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/962417</link><guid isPermaLink="true">https://dev.connect.gt/post/962417</guid><dc:creator><![CDATA[manetta]]></dc:creator><pubDate>Sat, 01 Jan 2011 19:17:44 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 17:40:28 GMT]]></title><description><![CDATA[<p dir="auto">Ma dal momento che</p>
<p dir="auto">query_posts(array('orderby' =&gt; 'rand', 'showposts' =&gt; 3)); ?&gt;</p>
<p dir="auto">non dà nessun risultato, qual è la parte di codice che dice che lì dentro escono i post "popular", o "random", o altro?</p>
]]></description><link>https://dev.connect.gt/post/962430</link><guid isPermaLink="true">https://dev.connect.gt/post/962430</guid><dc:creator><![CDATA[maxgiuliani]]></dc:creator><pubDate>Sat, 01 Jan 2011 17:40:28 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 17:27:40 GMT]]></title><description><![CDATA[<p dir="auto">Eccolo qua: <a href="http://wordpress.org/extend/themes/cover-wp" rel="nofollow ugc">wordpress.org/extend/themes/cover-wp</a></p>
]]></description><link>https://dev.connect.gt/post/962429</link><guid isPermaLink="true">https://dev.connect.gt/post/962429</guid><dc:creator><![CDATA[maxgiuliani]]></dc:creator><pubDate>Sat, 01 Jan 2011 17:27:40 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 17:22:21 GMT]]></title><description><![CDATA[<p dir="auto">Mi posti il link al tema originale che gli do un occhiata.</p>
]]></description><link>https://dev.connect.gt/post/962415</link><guid isPermaLink="true">https://dev.connect.gt/post/962415</guid><dc:creator><![CDATA[manetta]]></dc:creator><pubDate>Sat, 01 Jan 2011 17:22:21 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 17:02:01 GMT]]></title><description><![CDATA[<p dir="auto">macché...<br />
syntax error, unexpected $end</p>
]]></description><link>https://dev.connect.gt/post/962428</link><guid isPermaLink="true">https://dev.connect.gt/post/962428</guid><dc:creator><![CDATA[maxgiuliani]]></dc:creator><pubDate>Sat, 01 Jan 2011 17:02:01 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 16:59:32 GMT]]></title><description><![CDATA[<p dir="auto">Ah, Manetta, vedo ora la tua risposta... provo.</p>
]]></description><link>https://dev.connect.gt/post/962425</link><guid isPermaLink="true">https://dev.connect.gt/post/962425</guid><dc:creator><![CDATA[maxgiuliani]]></dc:creator><pubDate>Sat, 01 Jan 2011 16:59:32 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 16:47:19 GMT]]></title><description><![CDATA[<p dir="auto">Ne conto 13 aperte e 13 chiuse...<br />
D'altra parte se tolgo quella '{' che dice Manetta, Wordpress mi dice</p>
<p dir="auto">unexpected '}'</p>
]]></description><link>https://dev.connect.gt/post/962424</link><guid isPermaLink="true">https://dev.connect.gt/post/962424</guid><dc:creator><![CDATA[maxgiuliani]]></dc:creator><pubDate>Sat, 01 Jan 2011 16:47:19 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 16:41:34 GMT]]></title><description><![CDATA[<p dir="auto">Prova così:</p>
<pre><code>&lt;?php get_header(); ?&gt;
&lt;div id="content"&gt;
&lt;div id="center"&gt;
&lt;?php if((!is_paged()) &amp;&amp; (get_option('cover_wp_fp_layout', 'magazine') == 'magazine')) { ?&gt;
&lt;?php $sticky = get_option('sticky_posts'); $args = array('post__in' =&gt; $sticky); ?&gt;
&lt;?php query_posts($args); ?&gt;
&lt;?php if((have_posts()) &amp;&amp; (!empty($sticky))) : ?&gt;
&lt;div id="sticky"&gt;
&lt;h3&gt;&lt;?php _e('Announcements','cover-wp') ?&gt;&lt;/h3&gt;
&lt;?php while(have_posts()) : the_post(); ?&gt;
&lt;?php $words = 75;
$content = get_the_excerpt();
$excerpt = explode(' ',$content); ?&gt;
&lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p class="postmeta" style="margin-bottom:2px;"&gt;&lt;?php the_time(__('F jS, Y','cover-wp')); ?&gt; | &lt;?php comments_popup_link(__('Add a Comment','cover-wp'), __('1 Comment','cover-wp'), __('% Comments','cover-wp')); ?&gt;&lt;/p&gt;
&lt;div class="the_content"&gt;
&lt;?php
$words = display_thumbnail(230,165,$words,55);
if(count($excerpt) &gt; $words) $count = $words;
else $count = count($excerpt); ?&gt;
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '?'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Leggi tutto il post','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;!-- /the_content --&gt;
&lt;?php endwhile; ?&gt;
&lt;/div&gt;&lt;!-- /sticky --&gt;
&lt;?php endif; ?&gt;
&lt;?php wp_reset_query(); ?&gt;
&lt;div id="headline"&gt;
&lt;h3&gt;&lt;?php _e('Oggi su Tarantula','cover-wp') ?&gt;&lt;/h3&gt;
&lt;?php query_posts("caller_get_posts=1&amp;showposts=1"); $i = 1; ?&gt;
&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
&lt;?php $words = 75;
$content = get_the_excerpt();
$excerpt = explode(' ',$content); ?&gt;
&lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p class="postmeta" style="margin-bottom:2px;"&gt;&lt;?php the_time(__('F jS, Y','cover-wp')); ?&gt; | &lt;?php comments_popup_link(__('Add a Comment','cover-wp'), __('1 Comment','cover-wp'), __('% Comments','cover-wp')); ?&gt;&lt;/p&gt;
&lt;div class="the_content"&gt;
&lt;?php
$words = display_thumbnail(230,165,$words,55);
if(count($excerpt) &gt; $words) $count = $words;
else $count = count($excerpt); ?&gt;
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '?'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Leggi tutto il post','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;!-- /the_content --&gt;
&lt;?php endwhile; ?&gt;
&lt;?php wp_reset_query(); ?&gt;
&lt;?php else: ?&gt;
&lt;h2 class="center"&gt;&lt;?php _e('No Entries Found','cover-wp') ?&gt;&lt;/h2&gt;
&lt;p class="center"&gt;&lt;?php _e('There are no entries in this blog.','cover-wp') ?&gt;&lt;/p&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;&lt;!-- /headline --&gt;
&lt;div id="featured"&gt;
&lt;h3&gt;&lt;?php _e('Scelti da me','cover-wp') ?&gt;&lt;/h3&gt;
&lt;?php query_posts("caller_get_posts=1&amp;showposts=3&amp;catego ry_name=".get_option('cover_wp_featured_cat', 'Featured')); $i = 1; ?&gt;
&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
&lt;?php $words = 17;
$content = get_the_excerpt();
$excerpt = explode(' ',$content); ?&gt;
&lt;div class="spost"&gt;
&lt;h2&gt;&lt;a href="&lt;?php echo the_permalink(); ?&gt;" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;?php 
$words = display_thumbnail(95,80,$words,15);
if(count($excerpt) &gt; $words) $count = $words;
else $count = count($excerpt); ?&gt;
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '?'; ?&gt; &lt;a href="&lt;?php echo get_permalink($post-&gt;ID) ?&gt;"&gt;&lt;?php _e('Continua','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;!-- /spost --&gt;
&lt;div class="spbottom"&gt;&lt;/div&gt;
&lt;?php endwhile; ?&gt;
&lt;?php wp_reset_query(); ?&gt;
&lt;?php else: ?&gt;
&lt;h2 class="center"&gt;&lt;?php _e('No Featured Articles','cover-wp') ?&gt;&lt;/h2&gt;
&lt;p class="center"&gt;&lt;?php _e('Create a category called &amp;quot;Featured&amp;quot;. Articles in that category will be shown here.','cover-wp') ?&gt;&lt;/p&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;&lt;!-- /featured --&gt;
&lt;div id="popular"&gt;
&lt;h3&gt;&lt;?php _e('I più letti della settimana','cover-wp') ?&gt;&lt;/h3&gt;


&lt;?php query_posts(array('orderby' =&gt; 'rand', 'showposts' =&gt; 3)); ?&gt;
&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
&lt;?php $words = 17;
$content = get_the_excerpt();
$excerpt = explode(' ',$content); ?&gt;
&lt;div class="spost"&gt;
&lt;h2&gt;&lt;a href="&lt;?php echo the_permalink(); ?&gt;" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;?php
$words = display_thumbnail(95,80,$words,15);
if(count($excerpt) &gt; $words) $count = $words;
else $count = count($excerpt); ?&gt;
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '?'; ?&gt; &lt;a href="&lt;?php echo get_permalink($post-&gt;ID) ?&gt;"&gt;&lt;?php _e('Continua','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;!-- /spost --&gt;
&lt;div class="spbottom"&gt;&lt;/div&gt;


&lt;?php endwhile; ?&gt;
&lt;?php wp_reset_query(); ?&gt;
&lt;?php else: ?&gt;
&lt;h2 class="center"&gt;&lt;?php _e('No Featured Articles','cover-wp') ?&gt;&lt;/h2&gt;
&lt;p class="center"&gt;&lt;?php _e('Select a category from the Options Page or create a category called &amp;quot;Featured&amp;quot;. Articles in that category will be shown here.','cover-wp') ?&gt;&lt;/p&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;&lt;!-- /popular --&gt;
&lt;div id="latest"&gt;
&lt;h3&gt;&lt;?php _e('Articoli recenti','cover-wp') ?&gt;&lt;/h3&gt;
&lt;?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
$ppp = get_option('posts_per_page');
$ppp = $ppp - 1;
query_posts("caller_get_posts=1&amp;paged=$page&amp;showpo sts=$ppp&amp;offset=1"); ?&gt;
&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
&lt;?php $words = 60;
$content = get_the_excerpt();
$excerpt = explode(' ',$content); ?&gt;
&lt;div class="spost"&gt;
&lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;?php
$words = display_thumbnail(150,105,$words,55);
if(count($excerpt) &gt; $words) $count = $words;
else $count = count($excerpt) ?&gt;
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '?'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Leggi tutto il post','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;!-- /spost --&gt;
&lt;div class="spbottom"&gt;&lt;/div&gt;
&lt;?php endwhile; ?&gt;
&lt;?php wp_reset_query(); ?&gt;
&lt;div class="navigation"&gt;
&lt;?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } 
else { ?&gt;
&lt;div class="left"&gt;&lt;?php previous_posts_link(__('&amp;laquo; Articoli più recenti','cover-wp')) ?&gt;&lt;/div&gt;
&lt;div class="right"&gt;&lt;?php next_posts_link(__('Articoli precedenti &amp;raquo;','cover-wp') ) ?&gt;&lt;/div&gt;
&lt;?php } ?&gt;
&lt;/div&gt;
&lt;?php else: ?&gt;
&lt;h2 class="center"&gt;&lt;?php _e('No Entries Found','cover-wp') ?&gt;&lt;/h2&gt;
&lt;p class="center"&gt;&lt;?php _e('There are no entries in this blog.','cover-wp') ?&gt;&lt;/p&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;&lt;!-- /latest --&gt;

&lt;div id="the_loop"&gt;
&lt;p class="address"&gt;&lt;a href="&lt;?php echo home_url(); ?&gt;/" title="Home"&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt; &amp;raquo; &lt;?php _e('Archive','cover-wp') ?&gt;&lt;/p&gt;
&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
&lt;div &lt;?php post_class(); ?&gt; id="post-&lt;?php the_ID(); ?&gt;"&gt;
&lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p class="postmeta"&gt;&lt;?php the_time(__('F jS, Y','cover-wp')); ?&gt; | &lt;?php comments_popup_link(__('Add a Comment','cover-wp'), __('1 Comment','cover-wp'), __('% Comments','cover-wp')); ?&gt;&lt;/p&gt;
&lt;div class="the_content"&gt;
&lt;?php $words = 75;
$content = get_the_excerpt();
$excerpt = explode(' ',$content); ?&gt;
&lt;?php
$words = display_thumbnail(230,165,$words,55);
if(count($excerpt) &gt; $words) $count = $words;
else $count = count($excerpt) ?&gt;
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '?'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Leggi tutto il post','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;!-- /the_content --&gt;
&lt;p class="details"&gt;&lt;?php _e('Filed under:','cover-wp') ?&gt; &lt;?php the_category(', '); edit_post_link(__('Edit','cover-wp'), ' &amp;middot; ', ''); ?&gt;&lt;/p&gt;
&lt;/div&gt;&lt;!-- /post --&gt;
&lt;?php endwhile; ?&gt;
&lt;div class="navigation"&gt;
&lt;?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } 
else { ?&gt;
&lt;div class="left"&gt;&lt;?php previous_posts_link(__('&amp;laquo; Articoli più recenti','cover-wp')) ?&gt;&lt;/div&gt;
&lt;div class="right"&gt;&lt;?php next_posts_link(__('Articoli precedenti &amp;raquo;','cover-wp')) ?&gt;&lt;/div&gt;
&lt;?php } ?&gt;
&lt;/div&gt;
&lt;?php else: ?&gt;
&lt;h2 class="center"&gt;&lt;?php _e('No Entries Found','cover-wp') ?&gt;&lt;/h2&gt;
&lt;p class="center"&gt;&lt;?php _e('There are no entries in this blog.','cover-wp') ?&gt;&lt;/p&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;&lt;!-- /the_loop --&gt;
&lt;/div&gt;&lt;!-- /center --&gt;
&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/962416</link><guid isPermaLink="true">https://dev.connect.gt/post/962416</guid><dc:creator><![CDATA[manetta]]></dc:creator><pubDate>Sat, 01 Jan 2011 16:41:34 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 16:34:34 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>maxgiuliani</strong></p>
<p dir="auto">Mi dà<br />
Parse error: syntax error, unexpected '}'</p>
<p dir="auto">Se ripristino '{'<br />
Parse error: syntax error, unexpected T_ELSE<br />
<img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/96502213-6a65-49c7-a646-9c1b87466ed4-GTsad.gif?v=12b9555a9a1" class="not-responsive emoji emoji-customizations emoji--gtsad" style="height:1.4em;width:auto;vertical-align:middle" title=":gtsad:" alt="" /></p>
</blockquote>
<p dir="auto">Controlla il codice manca una parentesi o una è di troppo!</p>
]]></description><link>https://dev.connect.gt/post/962419</link><guid isPermaLink="true">https://dev.connect.gt/post/962419</guid><dc:creator><![CDATA[clubbu]]></dc:creator><pubDate>Sat, 01 Jan 2011 16:34:34 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 16:06:36 GMT]]></title><description><![CDATA[<p dir="auto">Ecco il file home.php (ancora grazie...)</p>
<p dir="auto">&lt;?php get_header(); ?&gt;<br />
&lt;div id="content"&gt;<br />
&lt;div id="center"&gt;<br />
&lt;?php if((!is_paged()) &amp;&amp; (get_option('cover_wp_fp_layout', 'magazine') == 'magazine')) { ?&gt;<br />
&lt;?php $sticky = get_option('sticky_posts'); $args = array('post__in' =&gt; $sticky); ?&gt;<br />
&lt;?php query_posts($args); ?&gt;<br />
&lt;?php if((have_posts()) &amp;&amp; (!empty($sticky))) : ?&gt;<br />
&lt;div id="sticky"&gt;<br />
&lt;h3&gt;&lt;?php _e('Announcements','cover-wp') ?&gt;&lt;/h3&gt;<br />
&lt;?php while(have_posts()) : the_post(); ?&gt;<br />
&lt;?php $words = 75;<br />
$content = get_the_excerpt();<br />
$excerpt = explode(' ',$content); ?&gt;<br />
&lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;<br />
&lt;p class="postmeta" style="margin-bottom:2px;"&gt;&lt;?php the_time(<strong>('F jS, Y','cover-wp')); ?&gt; | &lt;?php comments_popup_link(</strong>('Add a Comment','cover-wp'), <strong>('1 Comment','cover-wp'), <strong>('% Comments','cover-wp')); ?&gt;&lt;/p&gt;<br />
&lt;div class="the_content"&gt;<br />
&lt;?php<br />
$words = display_thumbnail(230,165,$words,55);<br />
if(count($excerpt) &gt; $words) $count = $words;<br />
else $count = count($excerpt); ?&gt;<br />
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '…'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Leggi tutto il post','cover-wp') ?&gt; »&lt;/a&gt;&lt;/p&gt;<br />
&lt;/div&gt;&lt;!-- /the_content --&gt;<br />
&lt;?php endwhile; ?&gt;<br />
&lt;/div&gt;&lt;!-- /sticky --&gt;<br />
&lt;?php endif; ?&gt;<br />
&lt;?php wp_reset_query(); ?&gt;<br />
&lt;div id="headline"&gt;<br />
&lt;h3&gt;&lt;?php _e('Oggi su Tarantula','cover-wp') ?&gt;&lt;/h3&gt;<br />
&lt;?php query_posts("caller_get_posts=1&amp;showposts=1"); $i = 1; ?&gt;<br />
&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;<br />
&lt;?php $words = 75;<br />
$content = get_the_excerpt();<br />
$excerpt = explode(' ',$content); ?&gt;<br />
&lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;<br />
&lt;p class="postmeta" style="margin-bottom:2px;"&gt;&lt;?php the_time(</strong>('F jS, Y','cover-wp')); ?&gt; | &lt;?php comments_popup_link(</strong>('Add a Comment','cover-wp'), __('1 Comment','cover-wp'), __('% Comments','cover-wp')); ?&gt;&lt;/p&gt;<br />
&lt;div class="the_content"&gt;<br />
&lt;?php<br />
$words = display_thumbnail(230,165,$words,55);<br />
if(count($excerpt) &gt; $words) $count = $words;<br />
else $count = count($excerpt); ?&gt;<br />
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '…'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Leggi tutto il post','cover-wp') ?&gt; »&lt;/a&gt;&lt;/p&gt;<br />
&lt;/div&gt;&lt;!-- /the_content --&gt;<br />
&lt;?php endwhile; ?&gt;<br />
&lt;?php wp_reset_query(); ?&gt;<br />
&lt;?php else: ?&gt;<br />
&lt;h2 class="center"&gt;&lt;?php _e('No Entries Found','cover-wp') ?&gt;&lt;/h2&gt;<br />
&lt;p class="center"&gt;&lt;?php _e('There are no entries in this blog.','cover-wp') ?&gt;&lt;/p&gt;<br />
&lt;?php endif; ?&gt;<br />
&lt;/div&gt;&lt;!-- /headline --&gt;<br />
&lt;div id="featured"&gt;<br />
&lt;h3&gt;&lt;?php _e('Scelti da me','cover-wp') ?&gt;&lt;/h3&gt;<br />
&lt;?php query_posts("caller_get_posts=1&amp;showposts=3&amp;category_name=".get_option('cover_wp_featured_cat', 'Featured')); $i = 1; ?&gt;<br />
&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;<br />
&lt;?php $words = 17;<br />
$content = get_the_excerpt();<br />
$excerpt = explode(' ',$content); ?&gt;<br />
&lt;div class="spost"&gt;<br />
&lt;h2&gt;&lt;a href="&lt;?php echo the_permalink(); ?&gt;" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;<br />
&lt;?php<br />
$words = display_thumbnail(95,80,$words,15);<br />
if(count($excerpt) &gt; $words) $count = $words;<br />
else $count = count($excerpt); ?&gt;<br />
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '…'; ?&gt; &lt;a href="&lt;?php echo get_permalink($post-&gt;ID) ?&gt;"&gt;&lt;?php _e('Continua','cover-wp') ?&gt; »&lt;/a&gt;&lt;/p&gt;<br />
&lt;/div&gt;&lt;!-- /spost --&gt;<br />
&lt;div class="spbottom"&gt;&lt;/div&gt;<br />
&lt;?php endwhile; ?&gt;<br />
&lt;?php else: ?&gt;<br />
&lt;h2 class="center"&gt;&lt;?php _e('No Featured Articles','cover-wp') ?&gt;&lt;/h2&gt;<br />
&lt;p class="center"&gt;&lt;?php _e('Create a category called "Featured". Articles in that category will be shown here.','cover-wp') ?&gt;&lt;/p&gt;<br />
&lt;?php endif; ?&gt;<br />
&lt;/div&gt;&lt;!-- /featured --&gt;<br />
&lt;div id="popular"&gt;<br />
&lt;h3&gt;&lt;?php _e('I più letti della settimana','cover-wp') ?&gt;&lt;/h3&gt;</p>
<pre><code>      &lt;?php
</code></pre>
<p dir="auto">if ( (get_bloginfo('version') &gt;= 2.9) &amp;&amp; (get_option('cover_wp_popular') == 'comments') )<br />
{<br />
query_posts(array('orderby' =&gt; 'rand', 'showposts' =&gt; 3)); ?&gt;<br />
&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;<br />
&lt;?php $words = 17;<br />
$content = get_the_excerpt();<br />
$excerpt =  explode(' ',$content); ?&gt;<br />
&lt;div class="spost"&gt;<br />
&lt;h2&gt;&lt;a href="&lt;?php  echo the_permalink(); ?&gt;" title="&lt;?php _e('Permanent  Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;<br />
&lt;?php<br />
$words = display_thumbnail(95,80,$words,15);<br />
if(count($excerpt) &gt; $words) $count = $words;<br />
else $count = count($excerpt); ?&gt;<br />
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '…'; ?&gt; &lt;a href="&lt;?php echo get_permalink($post-&gt;ID) ?&gt;"&gt;&lt;?php _e('Continua','cover-wp') ?&gt; »&lt;/a&gt;&lt;/p&gt;<br />
&lt;/div&gt;&lt;!-- /spost --&gt;<br />
&lt;div class="spbottom"&gt;&lt;/div&gt;</p>
<pre><code>          &lt;?php endwhile; ?&gt;
	      &lt;?php else: ?&gt;
            &lt;h2 class="center"&gt;&lt;?php _e('No Featured Articles','cover-wp') ?&gt;&lt;/h2&gt;
            &lt;p class="center"&gt;&lt;?php _e('Select a category from the Options Page or create a category called &amp;quot;Featured&amp;quot;. Articles in that category will be shown here.','cover-wp') ?&gt;&lt;/p&gt;
          &lt;?php endif;
		} else display_popular(); ?&gt;
    &lt;/div&gt;&lt;!-- /popular --&gt;
    &lt;div id="latest"&gt;
      &lt;h3&gt;&lt;?php _e('Articoli recenti','cover-wp') ?&gt;&lt;/h3&gt;
	  &lt;?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
	    $ppp = get_option('posts_per_page');
		$ppp = $ppp - 1;
        query_posts("caller_get_posts=1&amp;paged=$page&amp;showposts=$ppp&amp;offset=1"); ?&gt;
      &lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
	    &lt;?php $words = 60;
          $content = get_the_excerpt();
          $excerpt = explode(' ',$content); ?&gt;
        &lt;div class="spost"&gt;
          &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
          &lt;?php
            $words = display_thumbnail(150,105,$words,55);
			if(count($excerpt) &gt; $words) $count = $words;
			else $count = count($excerpt) ?&gt;
          &lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '&amp;#8230;'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Leggi tutto il post','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
        &lt;/div&gt;&lt;!-- /spost --&gt;
        &lt;div class="spbottom"&gt;&lt;/div&gt;
        &lt;?php endwhile; ?&gt;
		&lt;?php wp_reset_query(); ?&gt;
        &lt;div class="navigation"&gt;
	    &lt;?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } 
          else { ?&gt;
            &lt;div class="left"&gt;&lt;?php previous_posts_link(__('&amp;laquo; Articoli più recenti','cover-wp')) ?&gt;&lt;/div&gt;
            &lt;div class="right"&gt;&lt;?php next_posts_link(__('Articoli precedenti &amp;raquo;','cover-wp') ) ?&gt;&lt;/div&gt;
          &lt;?php } ?&gt;
        &lt;/div&gt;
      &lt;?php else: ?&gt;
        &lt;h2 class="center"&gt;&lt;?php _e('No Entries Found','cover-wp') ?&gt;&lt;/h2&gt;
        &lt;p class="center"&gt;&lt;?php _e('There are no entries in this blog.','cover-wp') ?&gt;&lt;/p&gt;
      &lt;?php endif; ?&gt;
    &lt;/div&gt;&lt;!-- /latest --&gt;
    &lt;?php } else { ?&gt;
    &lt;div id="the_loop"&gt;
    &lt;p class="address"&gt;&lt;a href="&lt;?php echo home_url(); ?&gt;/" title="Home"&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt; &amp;raquo; &lt;?php _e('Archive','cover-wp') ?&gt;&lt;/p&gt;
    &lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
      &lt;div &lt;?php post_class(); ?&gt; id="post-&lt;?php the_ID(); ?&gt;"&gt;
        &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
        &lt;p class="postmeta"&gt;&lt;?php the_time(__('F jS, Y','cover-wp')); ?&gt; | &lt;?php comments_popup_link(__('Add a Comment','cover-wp'), __('1 Comment','cover-wp'), __('% Comments','cover-wp')); ?&gt;&lt;/p&gt;
        &lt;div class="the_content"&gt;
          &lt;?php $words = 75;
            $content = get_the_excerpt();
            $excerpt = explode(' ',$content); ?&gt;
          &lt;?php
            $words = display_thumbnail(230,165,$words,55);
			if(count($excerpt) &gt; $words) $count = $words;
			else $count = count($excerpt) ?&gt;
          &lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '&amp;#8230;'; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php _e('Leggi tutto il post','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
        &lt;/div&gt;&lt;!-- /the_content --&gt;
        &lt;p class="details"&gt;&lt;?php _e('Filed under:','cover-wp') ?&gt; &lt;?php the_category(', '); edit_post_link(__('Edit','cover-wp'), ' &amp;middot; ', ''); ?&gt;&lt;/p&gt;
      &lt;/div&gt;&lt;!-- /post --&gt;
    &lt;?php endwhile; ?&gt;
    &lt;div class="navigation"&gt;
	  &lt;?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } 
        else { ?&gt;
          &lt;div class="left"&gt;&lt;?php previous_posts_link(__('&amp;laquo; Articoli più recenti','cover-wp')) ?&gt;&lt;/div&gt;
          &lt;div class="right"&gt;&lt;?php next_posts_link(__('Articoli precedenti &amp;raquo;','cover-wp')) ?&gt;&lt;/div&gt;
        &lt;?php } ?&gt;
    &lt;/div&gt;
    &lt;?php else: ?&gt;
      &lt;h2 class="center"&gt;&lt;?php _e('No Entries Found','cover-wp') ?&gt;&lt;/h2&gt;
      &lt;p class="center"&gt;&lt;?php _e('There are no entries in this blog.','cover-wp') ?&gt;&lt;/p&gt;
  &lt;?php endif; ?&gt;
    &lt;/div&gt;&lt;!-- /the_loop --&gt;
    &lt;?php } ?&gt;
  &lt;/div&gt;&lt;!-- /center --&gt;
</code></pre>
<p dir="auto">&lt;?php get_sidebar(); ?&gt;<br />
&lt;?php get_footer(); ?&gt;</p>
]]></description><link>https://dev.connect.gt/post/962423</link><guid isPermaLink="true">https://dev.connect.gt/post/962423</guid><dc:creator><![CDATA[maxgiuliani]]></dc:creator><pubDate>Sat, 01 Jan 2011 16:06:36 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 16:04:34 GMT]]></title><description><![CDATA[<p dir="auto">Prova a postare l'intero file.</p>
]]></description><link>https://dev.connect.gt/post/962414</link><guid isPermaLink="true">https://dev.connect.gt/post/962414</guid><dc:creator><![CDATA[manetta]]></dc:creator><pubDate>Sat, 01 Jan 2011 16:04:34 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 15:41:52 GMT]]></title><description><![CDATA[<p dir="auto">Mi dà<br />
Parse error: syntax error, unexpected '}'</p>
<p dir="auto">Se ripristino '{'<br />
Parse error: syntax error, unexpected T_ELSE<br />
<img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/96502213-6a65-49c7-a646-9c1b87466ed4-GTsad.gif?v=12b9555a9a1" class="not-responsive emoji emoji-customizations emoji--gtsad" style="height:1.4em;width:auto;vertical-align:middle" title=":gtsad:" alt="" /></p>
]]></description><link>https://dev.connect.gt/post/962422</link><guid isPermaLink="true">https://dev.connect.gt/post/962422</guid><dc:creator><![CDATA[maxgiuliani]]></dc:creator><pubDate>Sat, 01 Jan 2011 15:41:52 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 15:32:25 GMT]]></title><description><![CDATA[<p dir="auto">Prova a togliere:</p>
<pre><code>if ( (get_bloginfo('version') &gt;= 2.9) &amp;&amp; (get_option('cover_wp_popular') == 'comments') )
{
</code></pre>
]]></description><link>https://dev.connect.gt/post/962413</link><guid isPermaLink="true">https://dev.connect.gt/post/962413</guid><dc:creator><![CDATA[manetta]]></dc:creator><pubDate>Sat, 01 Jan 2011 15:32:25 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 15:17:31 GMT]]></title><description><![CDATA[<p dir="auto">Grazie Manetta, fatto. Ma resta uguale... (?)</p>
]]></description><link>https://dev.connect.gt/post/962421</link><guid isPermaLink="true">https://dev.connect.gt/post/962421</guid><dc:creator><![CDATA[maxgiuliani]]></dc:creator><pubDate>Sat, 01 Jan 2011 15:17:31 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per post random on Sat, 01 Jan 2011 15:04:11 GMT]]></title><description><![CDATA[<p dir="auto">Prova con questo codice:</p>
<pre><code>&lt;?php
if ( (get_bloginfo('version') &gt;= 2.9) &amp;&amp; (get_option('cover_wp_popular') == 'comments') )
{
query_posts(array('orderby' =&gt; 'rand', 'showposts' =&gt; 3)); ?&gt;
&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;
&lt;?php $words = 17;
$content = get_the_excerpt();
$excerpt = explode(' ',$content); ?&gt;
&lt;div class="spost"&gt;
&lt;h2&gt;&lt;a href="&lt;?php echo the_permalink(); ?&gt;" title="&lt;?php _e('Permanent Link to','cover-wp') ?&gt; &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;?php
$words = display_thumbnail(95,80,$words,15);
if(count($excerpt) &gt; $words) $count = $words;
else $count = count($excerpt); ?&gt;
&lt;p&gt;&lt;?php for($i = 0; $i &lt;= $count - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '?'; ?&gt; &lt;a href="&lt;?php echo get_permalink($post-&gt;ID) ?&gt;"&gt;&lt;?php _e('Continua','cover-wp') ?&gt; &amp;raquo;&lt;/a&gt;&lt;/p&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/962418</link><guid isPermaLink="true">https://dev.connect.gt/post/962418</guid><dc:creator><![CDATA[manetta]]></dc:creator><pubDate>Sat, 01 Jan 2011 15:04:11 GMT</pubDate></item></channel></rss>