<?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 User Favorites: Douzer</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Sat, 18 May 2013 22:01:08 +0000</pubDate>

<item>
<title>Douzer on "Two loops with different layouts"</title>
<link>http://themeshaper.com/forums/topic/two-loops-with-different-layouts#post-13123</link>
<pubDate>Tue, 15 Jun 2010 22:17:58 +0000</pubDate>
<dc:creator>Douzer</dc:creator>
<guid isPermaLink="false">13123@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Ok most of it solved, and it wasn't all that simple since the first post actually lies outside of the loop.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;div id=&#38;quot;container&#38;quot;&#38;gt;
		&#38;lt;div id=&#38;quot;content&#38;quot;&#38;gt;

   &#38;lt;div class=&#38;quot;featuredimg&#38;quot;&#38;gt;
&#38;lt;?php $recent = new WP_Query(&#38;quot;cat=5&#38;#38;showposts=1&#38;quot;); while($recent-&#38;gt;have_posts()) : $recent-&#38;gt;the_post();?&#38;gt;
&#38;lt;h2&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink() ; ?&#38;gt;&#38;quot;&#38;gt;
&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/h2&#38;gt;&#38;lt;/a&#38;gt;
&#38;lt;?php get_the_image( array( &#38;#39;default_size&#38;#39; =&#38;gt; &#38;#39;medium&#38;#39; ) ); ?&#38;gt;&#38;lt;p&#38;gt;&#38;lt;?php the_excerpt(); ?&#38;gt;&#38;lt;/p&#38;gt;

&#38;lt;?php endwhile; ?&#38;gt;
   &#38;lt;/div&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Actually it is working just like i want it to, but i have some concerns regarding the p-tag enclosing the excerpt. If i try to apply a class to the paragraph it stops working completely and reverts to standard text layout. Any ideas why?&#60;br /&#62;
Even though it's working i'm not all that comfortable with just giving it a flat p, i really do think it should have an individual styling.
&#60;/p&#62;</description>
</item>
<item>
<title>Douzer on "Two loops with different layouts"</title>
<link>http://themeshaper.com/forums/topic/two-loops-with-different-layouts#post-13109</link>
<pubDate>Tue, 15 Jun 2010 15:33:24 +0000</pubDate>
<dc:creator>Douzer</dc:creator>
<guid isPermaLink="false">13109@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Sorry for such a delayed reply Devin, but i have been trying out your suggestion and tweaked it a bit to fit my needs.&#60;br /&#62;
It works just as i wanted! I have a category where i post my portfolio items, and they are being displayed in columns just the way i wanted. Fkin genius you ;)&#60;/p&#62;
&#60;p&#62;Here's my template now:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
/*
Template Name: Portfolio
*/
?&#38;gt;

&#38;lt;?php get_header() ?&#38;gt;

&#38;lt;div id=&#38;quot;container&#38;quot;&#38;gt;
		&#38;lt;div id=&#38;quot;content&#38;quot;&#38;gt;

   &#38;lt;div id=&#38;quot;portfolio-featuredimg&#38;quot;&#38;gt;Image from the most recent post in portfolio category.&#38;lt;/div&#38;gt;
   &#38;lt;div id=&#38;quot;portfolio-featuredtext&#38;quot;&#38;gt;Title, actual post(the text), link to live site, tweet this, facebook-like button and rating.&#38;lt;/div&#38;gt;

	&#38;lt;?php
 $portfolio_items = get_posts(&#38;#39;&#38;#38;category=5&#38;#38;numberposts=9999&#38;#38;sort_column=post_date&#38;#38;sort_order=desc&#38;#39;);
 foreach($portfolio_items as $post) :
    setup_postdata($post);
?&#38;gt;

&#38;lt;div class=&#38;quot;portfolio-item&#38;quot; id=&#38;quot;portfolio-&#38;lt;?php the_ID(); ?&#38;gt;&#38;quot;&#38;gt;

&#38;lt;div class=&#38;quot;portfolio-image&#38;quot;&#38;gt;
    &#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink(); ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php the_post_thumbnail(); ?&#38;gt;&#38;lt;/a&#38;gt;
&#38;lt;/div&#38;gt;

    &#38;lt;div class=&#38;quot;portfolio-text&#38;quot;&#38;gt;

&#38;lt;h3&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink(); ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/h3&#38;gt;

&#38;lt;p class=&#38;quot;post-date&#38;quot;&#38;gt;&#38;lt;?php the_time(&#38;#39;M jS, Y&#38;#39;) ?&#38;gt;

&#38;lt;p class=&#38;quot;going&#38;quot;&#38;gt;&#38;lt;?php the_excerpt(&#38;#39;Read more...
&#38;#39;); ?&#38;gt;

&#38;lt;p class=&#38;quot;read-more&#38;quot;&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink(); ?&#38;gt;&#38;quot;&#38;gt;L&#38;amp;auml;s mer&#38;lt;/a&#38;gt;

&#38;lt;?php edit_post_link(&#38;#39;&#38;amp;Auml;ndra detta inl&#38;amp;auml;gg&#38;#39;, &#38;#39;&#38;#39;, &#38;#39;
&#38;#39;); ?&#38;gt;

&#38;lt;/div&#38;gt;

&#38;lt;div class=&#38;quot;clear&#38;quot;&#38;gt;&#38;lt;/div&#38;gt;

&#38;lt;/div&#38;gt;

 &#38;lt;?php endforeach; ?&#38;gt;

&#38;lt;?php if (function_exists(&#38;#39;wp_pagenavi&#38;#39;)) : ?&#38;gt;
&#38;lt;div class=&#38;quot;pagenavi&#38;quot;&#38;gt;
&#38;lt;?php wp_pagenavi(); ?&#38;gt;
&#38;lt;/div&#38;gt;
&#38;lt;?php else : // Use WordPress default page navigation. ?&#38;gt;
&#38;lt;div class=&#38;quot;pages&#38;quot;&#38;gt;
&#38;lt;?php next_posts_link(&#38;#39;&#38;amp;laquo; Older Entries&#38;#39;); ?&#38;gt;
&#38;lt;?php previous_posts_link(&#38;#39;Newer Entries &#38;amp;raquo;&#38;#39;); ?&#38;gt;
&#38;lt;/div&#38;gt;
&#38;lt;?php endif; ?&#38;gt;

&#38;lt;/div&#38;gt;
&#38;lt;/div&#38;gt;

&#38;lt;?php get_footer() ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Now the featured post.&#60;br /&#62;
As you can see right below where the content starts i made two divs where i would like my featured post to be. I'm unfortunately working locally so i can't show you anything, but the &#34;portfolio-featuredimg&#34; is about 2/3 of the contents width, and &#34;featuredtext&#34; takes up the last 1/3 in width.&#60;/p&#62;
&#60;p&#62;The idea is for the most recent post in the portfolio category to be shown at the top but very differently from the rest. I tried using &#34;get_the_image&#34; which gets the job done, but then i have to have a static post at the top.&#60;/p&#62;
&#60;p&#62;Here's an excellent example of what i would like it to look like: &#60;a href=&#34;http://www.chris-wallace.com/gallery/?p=446&#34;&#62;chris-wallace.com/gallery&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;From the top of my head i recon that i need to query these four elements: Image/Thumbnail, title, text and date. Is it possible to refer the query to the most recent post? The social buttons will adapt accordingly to the content being displayed.
&#60;/p&#62;</description>
</item>
<item>
<title>Devin on "Two loops with different layouts"</title>
<link>http://themeshaper.com/forums/topic/two-loops-with-different-layouts#post-13054</link>
<pubDate>Sun, 13 Jun 2010 18:16:30 +0000</pubDate>
<dc:creator>Devin</dc:creator>
<guid isPermaLink="false">13054@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I built a child theme for my portfolio when I was very new to Thematic, but I think this is still a good approach.  You can see my site: &#60;a href=&#34;http://wptheming.com/&#34; rel=&#34;nofollow&#34;&#62;http://wptheming.com/&#60;/a&#62; - I have thumbnail images from my portfolio pulled onto the home page, and then on &#60;a href=&#34;http://wptheming.com/portfolio/,&#34; rel=&#34;nofollow&#34;&#62;http://wptheming.com/portfolio/,&#60;/a&#62; I pull in just portfolio pages.  (I choose to do portfolio items as pages rather than posts)&#60;/p&#62;
&#60;p&#62;I displayed these simply by creating a page template, one for home.php and another for template-portfolio.php.  This was before featured images, but may give you an idea of what the code could look like:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
/*
Template Name: Portfolio
*/
?&#38;gt;

&#38;lt;?php get_header() ?&#38;gt;

&#38;lt;?php
 $portfolio_items = get_pages(&#38;#39;child_of=48&#38;#38;numberposts=4&#38;#38;sort_column=post_date&#38;#38;sort_order=desc&#38;#39;);
 foreach($portfolio_items as $post) :
    setup_postdata($post);
?&#38;gt;

&#38;lt;?php $website = get_post_meta($post-&#38;gt;ID, &#38;#39;website&#38;#39;, $single = true);?&#38;gt;
&#38;lt;?php $portfolio_img = get_post_meta($post-&#38;gt;ID, &#38;#39;portfolio_img&#38;#39;, $single = true);?&#38;gt;

&#38;lt;div class=&#38;quot;portfolio-item&#38;quot; id=&#38;quot;portfolio-&#38;lt;?php the_ID(); ?&#38;gt;&#38;quot;&#38;gt;

&#38;lt;div class=&#38;quot;portfolio-image&#38;quot;&#38;gt;
    &#38;lt;a href=&#38;quot;&#38;lt;?php echo $website; ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;img src=&#38;quot;&#38;lt;?php echo $portfolio_img; ?&#38;gt;&#38;quot; alt=&#38;quot;&#38;lt;?php the_title(); ?&#38;gt;&#38;quot; /&#38;gt;&#38;lt;/a&#38;gt;
&#38;lt;/div&#38;gt;

    &#38;lt;div class=&#38;quot;portfolio-text&#38;quot;&#38;gt;

&#38;lt;h3&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php echo $website; ?&#38;gt;&#38;quot; rel=&#38;quot;bookmark&#38;quot; title=&#38;quot;Permanent Link to &#38;lt;?php the_title(); ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/h3&#38;gt;

&#38;lt;p class=&#38;quot;post-date&#38;quot;&#38;gt;&#38;lt;?php the_time(&#38;#39;M jS, Y&#38;#39;) ?&#38;gt;&#38;lt;/p&#38;gt;

&#38;lt;?php the_content(&#38;#39;&#38;lt;p&#38;gt;Read more...&#38;lt;/p&#38;gt;&#38;#39;); ?&#38;gt;

&#38;lt;?php edit_post_link(&#38;#39;Edit this entry.&#38;#39;, &#38;#39;&#38;lt;p&#38;gt;&#38;#39;, &#38;#39;&#38;lt;/p&#38;gt;&#38;#39;); ?&#38;gt;

&#38;lt;/div&#38;gt;

&#38;lt;div class=&#38;quot;clear&#38;quot;&#38;gt;&#38;lt;/div&#38;gt;

&#38;lt;/div&#38;gt;

 &#38;lt;?php endforeach; ?&#38;gt;

&#38;lt;?php if (function_exists(&#38;#39;wp_pagenavi&#38;#39;)) : ?&#38;gt;
&#38;lt;div class=&#38;quot;pagenavi&#38;quot;&#38;gt;
&#38;lt;?php wp_pagenavi(); ?&#38;gt;
&#38;lt;/div&#38;gt;
&#38;lt;?php else : // Use WordPress default page navigation. ?&#38;gt;
&#38;lt;div class=&#38;quot;pages&#38;quot;&#38;gt;
&#38;lt;?php next_posts_link(&#38;#39;&#38;amp;laquo; Older Entries&#38;#39;); ?&#38;gt;
&#38;lt;?php previous_posts_link(&#38;#39;Newer Entries &#38;amp;raquo;&#38;#39;); ?&#38;gt;
&#38;lt;/div&#38;gt;
&#38;lt;?php endif; ?&#38;gt;

&#38;lt;?php get_footer() ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If you do make your gallery items as posts, you can make that category display differently by using a category template: &#60;a href=&#34;http://codex.wordpress.org/Category_Templates&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Category_Templates&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;If you are using a second query posts array, you may want to read through Binary Moon's excellent post: &#60;a href=&#34;http://www.binarymoon.co.uk/2010/03/5-wordpress-queryposts-tips/&#34; rel=&#34;nofollow&#34;&#62;http://www.binarymoon.co.uk/2010/03/5-wordpress-queryposts-tips/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Also, WordPress 3.0 supports custom post types.  I'm hoping to release a new theme in the next couple weeks that will take advantage of that for portfolio type websites.
&#60;/p&#62;</description>
</item>
<item>
<title>Douzer on "Two loops with different layouts"</title>
<link>http://themeshaper.com/forums/topic/two-loops-with-different-layouts#post-13042</link>
<pubDate>Sat, 12 Jun 2010 23:54:44 +0000</pubDate>
<dc:creator>Douzer</dc:creator>
<guid isPermaLink="false">13042@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I am working on my new site where i want to have a page for my portfolio for sites i have created.&#60;br /&#62;
The layout i had in mind for the portfolio is like this: &#60;a href=&#34;http://crobin.deviantart.com/#/d2olf67&#34; rel=&#34;nofollow&#34;&#62;http://crobin.deviantart.com/#/d2olf67&#60;/a&#62; (the six thumbnails). Above these thumbnails i would like to have a featured site, but that is the least of my problems.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;My idea for a solution:&#60;/strong&#62;&#60;br /&#62;
Use Aarons &#60;a href=&#34;http://themeshaper.com/forums/topic/how-to-display-posts-from-categories-on-pages-using-a-second-loop#post-9021&#34; rel=&#34;nofollow&#34;&#62;http://themeshaper.com/forums/topic/how-to-display-posts-from-categories-on-pages-using-a-second-loop#post-9021&#60;/a&#62; to create a second loop on the Portfolio-page where i put posts from a certain category. These posts should be displayed in columns, so i tried the tutorial &#60;a href=&#34;http://hardiannazief.com/12/create-custom-posts-layout-in-home-page-thematic-child-theme/comment-page-1/#comment-4051&#34; rel=&#34;nofollow&#34;&#62;http://hardiannazief.com/12/create-custom-posts-layout-in-home-page-thematic-child-theme/comment-page-1/#comment-4051&#60;/a&#62; which worked perfectly, but for the front page posts only. (changing index loop to second loop?)&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Why the hassle?&#60;/strong&#62;&#60;br /&#62;
I know, i could just query specific posts and put them in columns. But the whole idea of WP is in the simplicity content can be added. Therefore i will not hardcode a new query every time a new post should be added.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Am i stupid?&#60;/strong&#62;&#60;br /&#62;
Probably. But i'm also new to this with Child Theme-making, so i have some learning to do. There are bundles of ways to put content into columns and i know that most of them work because i've used them before, but i can't find the regular loop code in any of them?&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&#38;gt;&#60;/code&#62; &#38;lt;-- That one ;)
&#60;/p&#62;</description>
</item>

</channel>
</rss>
