<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Topic: List most recent post from 5 categories with thumbnail?</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Thu, 23 May 2013 23:59:03 +0000</pubDate>

<item>
<title>Chris on "List most recent post from 5 categories with thumbnail?"</title>
<link>http://themeshaper.com/forums/topic/list-most-recent-post-from-5-categories-with-thumbnail#post-7785</link>
<pubDate>Sun, 08 Nov 2009 13:12:13 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">7785@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;if you follow the example on &#60;a href=&#34;http://codex.wordpress.org/Template_Tags/get_posts,&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Template_Tags/get_posts,&#60;/a&#62; it should work. These examples are using the $post array also used by the Get-The-Image Plugin.&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>versatilist on "List most recent post from 5 categories with thumbnail?"</title>
<link>http://themeshaper.com/forums/topic/list-most-recent-post-from-5-categories-with-thumbnail#post-7746</link>
<pubDate>Fri, 06 Nov 2009 05:10:34 +0000</pubDate>
<dc:creator>versatilist</dc:creator>
<guid isPermaLink="false">7746@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I'm trying to pull the most recent post title and post image thumb from 5 categories (out of ~20) in a specific order. This list is in addition to another loop on the page (the main loop), or the single post/page.&#60;/p&#62;
&#60;p&#62;I need to pull the image thumbnail from that post, but NOT using any special fields (ala get-the-image plugin).&#60;/p&#62;
&#60;p&#62;Here is what I have so far (starting with 4):&#60;/p&#62;
&#60;p&#62;    // Cat 1307&#60;br /&#62;
    echo '&#38;lt;li id=&#34;hcol4&#34; class=&#34;header-post&#34;&#38;gt;';&#60;br /&#62;
		$posts_hcol4 = get_posts( &#34;category=1307&#38;#38;numberposts=1&#34; );&#60;br /&#62;
		if( $posts_hcol4 ) {&#60;br /&#62;
        	foreach( $posts_hcol4 as $post_n4 ) {&#60;br /&#62;
				setup_postdata( $post_n4 );&#60;/p&#62;
&#60;p&#62;				  echo '&#38;lt;a href=&#34;';&#60;br /&#62;
				  echo (get_permalink($post_n4-&#38;gt;ID));&#60;br /&#62;
				  echo '&#34; title=&#34;Permanent Link to ';&#60;br /&#62;
				  echo (get_the_title($post_n4-&#38;gt;ID));&#60;br /&#62;
				  echo '&#34;&#38;gt;' ;&#60;br /&#62;
				  echo (get_the_title($post_n4-&#38;gt;ID));&#60;br /&#62;
				  echo '';&#60;br /&#62;
				}&#60;br /&#62;
			}&#60;br /&#62;
    echo '';&#60;/p&#62;
&#60;p&#62;    // Cat 1303&#60;br /&#62;
    echo '&#38;lt;li id=&#34;hcol5&#34; class=&#34;header-post&#34;&#38;gt;';&#60;br /&#62;
		$posts_hcol5 = get_posts( &#34;category=1303&#38;#38;numberposts=1&#34; );&#60;br /&#62;
		if( $posts_hcol5 ) {&#60;br /&#62;
        	foreach( $posts_hcol5 as $post_n5 ) {&#60;br /&#62;
				setup_postdata( $post_n5 );&#60;br /&#62;
				  /*print get_the_image(array('custom_key' =&#38;gt; array('post_image_value'), 'default_size' =&#38;gt; 'thumbnail', 'image_scan' =&#38;gt; true, 'default_image' =&#38;gt; get_bloginfo( 'template_url' ) . '/files/2009/11/sample.jpg', 'width' =&#38;gt; '120', 'height' =&#38;gt; '100', 'post_id' =&#38;gt; $post_n5-&#38;gt;ID));*/&#60;br /&#62;
				  echo '&#38;lt;a href=&#34;';&#60;br /&#62;
				  echo (get_permalink($post_n5-&#38;gt;ID));&#60;br /&#62;
				  echo '&#34; title=&#34;Permanent Link to ';&#60;br /&#62;
				  echo (get_the_title($post_n5-&#38;gt;ID));&#60;br /&#62;
				  echo '&#34;&#38;gt;' ;&#60;br /&#62;
				  echo (get_the_title($post_n5-&#38;gt;ID));&#60;br /&#62;
				  echo '';&#60;br /&#62;
				}&#60;br /&#62;
			}&#60;br /&#62;
    echo '';&#60;/p&#62;
&#60;p&#62;Unfortunately the image is using the Global post variable. If I set the variable (post_id) only the first set works, all others use that same variable. It also seems like I should be able to do this with one query...&#60;/p&#62;
&#60;p&#62;I'm using the most recent version of thematic and a variation of thematicfeaturesite.&#60;/p&#62;
&#60;p&#62;Any ideas?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
