<?xml version="1.0" encoding="UTF-8"?>
<rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Propaganda Party</title>
	<atom:link href="http://blog.popstalin.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.popstalin.com</link>
	<description>The Pop Stalin Design Manifesto</description>
	<pubDate>Tue, 21 Apr 2009 01:04:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Creating a WordPress Magazine-esque Theme: Part II</title>
		<link>http://feedproxy.google.com/~r/thepropagandaparty/~3/QeA9XqNg65U/manifesto-09-wordpress-theme-part-2</link>
		<comments>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-2#comments</comments>
		<pubDate>Mon, 20 Apr 2009 12:00:44 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/?p=224</guid>
		<description><![CDATA[Second part in a three part series of how I created the theme for my blog using a magazine-esque layout and WordPress custom loops and queries.]]></description>
			<content:encoded><![CDATA[<h2>Single.php and Category pages</h2>
<p><a href="http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-1">In part 1</a>, I covered the code necessary to provide my home page functionality. In this segment, I&#8217;ll cover how I created the functionality for the single.php page and the category pages. The code for the single.php page closely mirrors the code for the index.php page with the addition of the comment code. Again, the process for creating these pages closely followed that of the index page&#8211;I created a prototype sketch, I fleshed it out in Photoshop and then I opened my text editor and started coding. <span id="more-224"></span></p>
<p>First, I wanted the single page to have roughly the same appearance as the index.php minus the additional posts below the &#8220;featured&#8221; post. I wanted the image to carry over into the post and I wanted the text to be the main emphasis on the page because that&#8217;s what a blog is all about in my opinion. I&#8217;ve seen lots of designs I like that had asides to the left or right of the post but in this incarnation, I wanted the reader to focus solely on the text of the post when clicking through. </p>
<h2>1. Single.php Code</h2>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
// THIS IS WHERE MY META AND OTHER POST CONTENT GOES
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">else</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
// THIS IS WHERE I PUT SOME SORT OF MESSAGE TELLING THE READER THEY'VE NOT FOUND WHAT THEY'RE LOOKING FOR
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
// SOME MORE OF MY OWN CSS LAYOUT CODE
<span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
// I CLOSE UP ALL MY OPEN DIV'S
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>As you can see, there are no custom loops or queries. The only &#8220;custom&#8221; code on this page is my CSS and the code I need to bring in the image from the custom field, which was covered in part 1. The real &#8220;exciting&#8221; stuff, actually takes place within the category pages so I&#8217;ll go over that in more detail next. </p>
<h2>2. Category Pages and the Template Hierarchy</h2>
<p>When visiting the WordPress Codex, I&#8217;ve often see the phrase &#8220;<strong>Template Hierarchy</strong>&#8221; but until this design, I&#8217;d never really read about it. What I learned was that if I wanted a different look or custom loops, I could use the hierarchy. The <strong>Template Hierarchy</strong> works like this; let&#8217;s say I have 5 categories and I want them each to have their own page. I can achieve this by creating a category page for each separate category and WordPress will look for a specific page for the category if I name the file the following way: <strong>category-5.php</strong>. The number in the file name is the actual number of the category so when a visitor clicks on, for example, <strong>Design</strong> and <strong>Design</strong> is <strong>category 5</strong> in the database, WordPress will serve that page using <strong>category-5.php</strong> instead of just <strong>category.php</strong> or <strong>archives.php</strong>. It&#8217;s a simple way to create unique pages per category without the hassle of really having to creating template files. </p>
<h2>3. Custom Loop for Category Pages</h2>
<p>The first thing you&#8217;ll see on each category page is the heading for that page. For example, in the business category, you&#8217;ll see &#8220;<strong>Business Articles</strong>.&#8221; That is handled dynamically by using the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> single_cat_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> Articles&lt;/h2&gt;</pre></div></div>

<p>The PHP tells the database to spit out the category name or title. </p>
<p>The next thing you&#8217;ll see is the posts with excerpts. This is handled using a custom WordPress Query.</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$temp</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$wp_query</span><span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$wp_query</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'showposts=16&amp;cat=3,9'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;paged='</span><span style="color: #339933;">.</span><span style="color: #000088;">$paged</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>A very important part of this custom query is telling WordPress that this page will be&#8230;paged; meaning there is more than one page. In order to use a custom query, you must use that bit of PHP code or else your paging, whether you use a plugin or the built-in navigation of older or newer entries, won&#8217;t work. </p>
<p>The next important part of this query is indicating how many posts per page should be displayed and what categories to display. Since I have sub-categories set-up under the main categories, I want to make sure those show up as well.</p>
<h2>Styling My Category Pages</h2>
<p>An important part of the next piece of custom code was styling the most recent post differently (do you notice a trend?). I wanted that post to stand out from all the others for two reasons. It gives the reader a point of reference as to what&#8217;s important on the page and it helps break up the design a little. </p>
<p>I decided when planning my redesign that I didn&#8217;t want the typical archives. I wanted to display past articles in a different way starting with making the most recent article be prominent on the category page. I did this with a simple bit of code that I discovered through the <a href="http://wordpress.org/support/topic/212494">WordPress forums with the help of pshero</a>.  He too was looking for a way to style the most recent post differently than the rest and came up with the PHP code that would do the trick. Here is what I used to make the most recent post stand out on the category page.</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>8
9
10
11
12
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_paged<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$postclass</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'archivelist'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$postclass</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$posts</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'archivelist-featured'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'archivelist'</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Then the above is applied to your div class the following way:</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>13
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$postclass</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></td></tr></table></div>

<p>Basically, what this piece of code does is create a way to assign two classes to the posts on the page dynamically. If it&#8217;s the most recent post, then it is assigend &#8220;archivelist-featured&#8221; and any subsequent post is then tagged with &#8220;archivelist.&#8221; If you click on the link above, it will take you to the thread and explain in more detail different usage. </p>
<h2>4. Crossing the Finish Line</h2>
<p>After I make things pretty, we need to add some of the basic WordPress code to show the date, post title and the excerpt.</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>14
15
16
17
18
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;h3 class=&quot;meta&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_date<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m-d-y'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &amp;#8249;&amp;#8250; <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_category<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">', '</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h3&gt;
  &lt;h3&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/h3&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>   
   &lt;/div&gt;&lt;!-- // END ARCHIVE LIST --&gt;    
   <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>We&#8217;re getting there. The last thing you may notice on the page, other than the footer, is the paged navigation. In order for that to work properly, you have to code it the following way:</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>19
20
21
22
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;navigation&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_pagenavi'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> wp_pagenavi<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>  
&lt;/div&gt;&lt;!-- // END NAVIGATION --&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$wp_query</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">;</span> <span style="color: #000088;">$wp_query</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$temp</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>You&#8217;ll notice that we close the custom WordPress query <strong><em>after</em></strong> we call for the paged navigation. If you don&#8217;t do that, you&#8217;ll have your pagination showing up on every page, most likely not showing a correct page count.</p>
<h2>The End is Nigh</h2>
<p>In this post I covered using PHP to dynamically pass CSS classes to differentiate posts, I covered template hierarchy and its purpose and I covered paging and custom queries. I hope this is useful to folks and expanding on your WordPress coding foundation.</p>
<p>In part three, a much shorter article by far, I&#8217;ll cover what plug-in&#8217;s I&#8217;m using and why and the benefits of automated content.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=QeA9XqNg65U:pq8RUTXD3tM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=QeA9XqNg65U:pq8RUTXD3tM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thepropagandaparty/~4/QeA9XqNg65U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-2/feed</wfw:commentRss>
		<feedburner:origLink>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-2</feedburner:origLink></item>
		<item>
		<title>Link Tank: April 19th</title>
		<link>http://feedproxy.google.com/~r/thepropagandaparty/~3/hRSa5lSvh5U/link-tank-april-19th</link>
		<comments>http://blog.popstalin.com/articles/general/link-tank/link-tank-april-19th#comments</comments>
		<pubDate>Sun, 19 Apr 2009 14:32:58 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
		
		<category><![CDATA[Link Tank]]></category>

		<category><![CDATA[brushes]]></category>

		<category><![CDATA[photoshop]]></category>

		<category><![CDATA[resources]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/?p=295</guid>
		<description><![CDATA[<h3>Here are some delicious links for your enjoyment and edumication:</h3>
<p><a href="http://www.highresolutiontextures.com/6-hi-res-wood-textures#more-196">6 hi-res wood textures &#124; highresolutiontextures.com</a> - 6 high quality images of various sorts of wood or bark.</p>
<p><a href="http://lostandtaken.com/blog/2009/4/17/a-little-dirty-8-subtle-grunge-textures.html">Lost and Taken - Lost and Taken - A Little Dirty: 8 Subtle Grunge&#160;Textures</a> - A Little Dirty: 8 Subtle Grunge&#8230;</p>]]></description>
			<content:encoded><![CDATA[<h3>Here are some delicious links for your enjoyment and edumication:</h3>
<p><a href="http://www.highresolutiontextures.com/6-hi-res-wood-textures#more-196">6 hi-res wood textures | highresolutiontextures.com</a> - 6 high quality images of various sorts of wood or bark.</p>
<p><a href="http://lostandtaken.com/blog/2009/4/17/a-little-dirty-8-subtle-grunge-textures.html">Lost and Taken - Lost and Taken - A Little Dirty: 8 Subtle Grunge&nbsp;Textures</a> - A Little Dirty: 8 Subtle Grunge Textures</p>
<p><a href="http://qbrushes.com/photoshop-abstract-brushes/photoshop-light-brushes/">Photoshop Light brushes | Qbrushes - Photoshop Brushes</a> - Blurry light Brushes (Bokeh), 3 shapes (circle, hexagon, octagon), 9 brushes total.</p>
<p><a href="http://qbrushes.com/misc/skyline-brushes/">Photoshop Skyline Brushes | Qbrushes - Photoshop Brushes</a> - A set of 9 wonderful city skyline brushes for Photoshop 7 and up. Sizes range from 1000px to 1300px.</p>
<p><a href="http://qbrushes.com/grunge/valley-of-the-dry-bones-3/">Grungy Brushes from QBrushes</a> - Valley of the Dry Bones is a set of grunge brushes by seudavi with an average size of 1500px/</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=hRSa5lSvh5U:fQIkzoMHP4Y:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=hRSa5lSvh5U:fQIkzoMHP4Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thepropagandaparty/~4/hRSa5lSvh5U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/general/link-tank/link-tank-april-19th/feed</wfw:commentRss>
		<feedburner:origLink>http://blog.popstalin.com/articles/general/link-tank/link-tank-april-19th</feedburner:origLink></item>
		<item>
		<title>Creating a WordPress Magazine-esque Theme: Part I</title>
		<link>http://feedproxy.google.com/~r/thepropagandaparty/~3/JHjfgvOZyEg/manifesto-09-wordpress-theme-part-1</link>
		<comments>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-1#comments</comments>
		<pubDate>Wed, 15 Apr 2009 10:00:11 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/?p=222</guid>
		<description><![CDATA[First part in a three part series of how I created the theme for my blog using a magazine-esque layout and WordPress custom loops and queries.]]></description>
			<content:encoded><![CDATA[<h2>The Creation of Manifesto &#8216;09</h2>
<p>When I thought about the redesign of my blog, I wanted something that had a magazine feel to it but not the full functionality of a magazine theme. I didn’t need to display sections for different categories because I still wanted to run a blog and not a magazine&#8211;though in the future I could see myself actually adding that sort of functionality and turn my blog into a magazine. <span id="more-222"></span></p>
<p>I looked at all the available magazine layout themes, both paid and free, to get a feel for what it is that I like about them. The recurring theme that I liked about magazine layouts is the grid system. So I put pencil to paper and began sketching box after box attempting to get a simple grid layout that would satisfy my desire to have a magazine-esque layout. After a prototype or ten I had my creative juices flowing pretty well. I fired up Photoshop and played with color and layout until I came close to the design you see now. Just a side note, when it comes to my own sites, I often deviate from my Photoshop concepts after I start coding. For example, in my design concept, my footer was part of the five regular posts (limiting my posts to 4 on the front page). After playing about a bit with widths and other CSS styles, I decided to actually create a footer and use that space for additional posts.</p>
<p>After getting a close approximation of what I wanted it to look like, I started to think about how it would function. I wasn&#8217;t wild about the idea of having to create a &#8220;featured&#8221; category just to have a featured post. If I had a featured category, did I want to link to it and if I didn’t, what was the point of having a featured category to begin with. After deciding that a featured category was not an option, I looked for plugin’s but I didn&#8217;t want to use theme to achieve that option either. I decided not to allow my limited PHP knowledge hold me back from what I knew WordPress can do.</p>
<p>I set about researching my options and custom loops, finally figuring out a way to mix CSS and PHP to get what I wanted on the front page. I know there are probably ways that accomplish this with less code or more complex functions but I’m working within my abilities of PHP coding and learning as I go. </p>
<p>Without further ado, here’s how I accomplished my front page layout.</p>
<h2>1. Featured Post Custom Loop Code</h2>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$featured</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$featured</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'posts_per_page=1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$featured</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$featured</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
// THIS IS WHERE MY META AND OTHER POST CONTENT GOES
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>The third line of code starts the loop. It tells WordPress that there&#8217;s a new database query about to happen. The fourth line of code tells the database to give us one post and the most recent one at that. The fifth line tells the database that the loop begins now if there is a post. The area of greatest interest for my needs is <strong>posts_per_page</strong>. Since my newest post was going to be &#8220;featured&#8221; I only wanted to show one and stop. Once I had that working, I went on the implement the second custom loop to display the additional posts on the front page.</p>
<h2>2. Regular Posts Custom Loop Code</h2>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$asides</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$asides</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'posts_per_page=5&amp;offset=1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$asides</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$asides</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
// THIS IS WHERE I PUT MY CODE FOR THE ADDITIONAL POST TITLES AND EXCERPTS
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>On line #11 I have similar code as the original query but I go a bit further in telling the database what I&#8217;m looking for. I want to display 5 posts now but I don&#8217;t want to show the &#8220;featured&#8221; or first post, so I tell the database to retrieve 5 posts but to ignore the first or newest one, which is what <strong>offset=1</strong> does. If I were displaying 3 featured posts, I would set the offset at <strong>offset=3</strong>.</p>
<p>Another bit of custom coding I did was to use <strong>custom fields</strong> to display an image in my featured post. The nice part of this code, is that if I don&#8217;t want to attach an image to the post, I don&#8217;t end up getting any errors because of a missing image. First, I went into the <strong>Add New Post</strong> screen and created a <strong>custom field</strong> called <strong>featuredImage</strong>. Then I put the following code in my index.php and category.php templates.</p>
<h2>3. Custom Fields for Featured Images</h2>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$values</span> <span style="color: #339933;">=</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;featuredImage&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div class=&quot;featured-img&quot;&gt;
&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$values</span> <span style="color: #339933;">=</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;featuredImage&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> Image&quot; /&gt;
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>The second line of code is the variable that the third line of code works with to see if there is a value to display. If the value isn&#8217;t null, then my div class gets printed. If the value is null, then nothing gets printed at all, i.e., if you look at the source code, there is no image because I didn&#8217;t specify one in my post.</p>
<h2>Wrapping Up Part 1</h2>
<p>If you&#8217;re reading this article, you know the power of WordPress and are probably trying to harness that power to customize your site. What I&#8217;ve posted is how I handled having a &#8220;featured&#8221; post and not having to have a &#8220;featured&#8221; category in order to have a different style for my first post. I hope this post helps some folks because I wasn&#8217;t able to find a tutorial (or code) that showed how to accomplish this. </p>
<p>In the <a href="http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-2">next part</a> of this three part series, I&#8217;ll talk about how I accomplished the layout of my category pages&#8211;and in my case my archives as well, since they serve the same purpose. After coding my index.php page, I discovered another way that is much cleaner code to achieve having the first post having a different look than the rest. I used that method on the category pages so stay tuned to part two to learn how to use a custom loop and PHP to call specific CSS for your first post.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=JHjfgvOZyEg:_54Y425ppqk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=JHjfgvOZyEg:_54Y425ppqk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thepropagandaparty/~4/JHjfgvOZyEg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-1/feed</wfw:commentRss>
		<feedburner:origLink>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-1</feedburner:origLink></item>
		<item>
		<title>Link Tank: April 14th</title>
		<link>http://feedproxy.google.com/~r/thepropagandaparty/~3/QMjESAhwVTI/link-tank-april-14th</link>
		<comments>http://blog.popstalin.com/articles/general/link-tank/link-tank-april-14th#comments</comments>
		<pubDate>Tue, 14 Apr 2009 21:00:20 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
		
		<category><![CDATA[Link Tank]]></category>

		<category><![CDATA[Inspiration]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[reference]]></category>

		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/?p=234</guid>
		<description><![CDATA[<h3>Here are some delicious links for your enjoyment and edumication:</h3>
<p><a href="http://wefunction.com/2009/04/quality-within-web-design/">Function Web Design &#38; Development [ Blog ] &#187; How to Spot Quality within Web Design: Examples &#38; Tips</a> - Tips from the folks at Function Web Design &#38; Development on what constitutes quality web design. I&#8230;</p>]]></description>
			<content:encoded><![CDATA[<h3>Here are some delicious links for your enjoyment and edumication:</h3>
<p><a href="http://wefunction.com/2009/04/quality-within-web-design/">Function Web Design &amp; Development [ Blog ] &raquo; How to Spot Quality within Web Design: Examples &amp; Tips</a> - Tips from the folks at Function Web Design &amp; Development on what constitutes quality web design. I don&#39;t agree with everything written but there are some things that they bring up that make a whole lot of sense. Especially the whole &quot;attention to details&quot; part. It&#39;s the minutiae in design that takes it to the next level.</p>
<p><a href="http://versionsapp.com/">Versions - Mac Subversion Client (SVN)</a> - Versions, as the title says is a Mac Subversion client. However, that&#39;s not why I bookmarked this site. The simplicity of the design astounds me yet it&#39;s so well done and has quite an impact. You&#39;re to notice their brand, and boy, do you.</p>
<p>Of course, it&#39;s also a useful piece of software for those of us Mac users who want to use version control.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=QMjESAhwVTI:3YknV5siaLs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=QMjESAhwVTI:3YknV5siaLs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thepropagandaparty/~4/QMjESAhwVTI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/general/link-tank/link-tank-april-14th/feed</wfw:commentRss>
		<feedburner:origLink>http://blog.popstalin.com/articles/general/link-tank/link-tank-april-14th</feedburner:origLink></item>
		<item>
		<title>Yearly Redesign Completed</title>
		<link>http://feedproxy.google.com/~r/thepropagandaparty/~3/EuUWgyYbfcY/yearly-redesign-completed</link>
		<comments>http://blog.popstalin.com/articles/design/yearly-redesign-completed#comments</comments>
		<pubDate>Tue, 14 Apr 2009 06:43:12 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/?p=217</guid>
		<description><![CDATA[New curtains, fresh coat of paint and some general spring cleaning brings about Manifesto '09; the yearly redesign of my blog is complete...almost. ]]></description>
			<content:encoded><![CDATA[<p>New curtains, fresh coat of paint and some general spring cleaning brings about Manifesto &#8216;09; the yearly redesign of my blog.  There are still a few things that I need to take care of tomorrow (later today) but it&#8217;s 99.9% completed. I have to play some more with the branding area because it&#8217;s not displaying as it should and I had to implement a quick fix for the time being. You&#8217;ll notice there are some issues with the drop shadow&#8230; that&#8217;s the quick fix I had to throw up there. <span id="more-217"></span></p>
<p>For whatever reason, the div (which is actually an h1 tag, didn&#8217;t want to center in IE7 and when I finally got it to center, then it wouldn&#8217;t go the whole way across the screen. It stopped at the edges of the #wrapper container&#8230; which is odd because the branding graphic isn&#8217;t even inside the #wrapper container. I&#8217;m sure I&#8217;m missing something simple but I&#8217;m too tired to find it right now.</p>
<p>I plan on writing about my experience with the coding of the site and what I had to do as far as custom loops and such to &#8220;bend&#8221; WordPress to my will. Of course, I was pretty sure a few times WordPress was bending me to its will.</p>
<p>If you come across anything out of place in IE7 or 8, please let me know. I don&#8217;t have access to anything but IE7 and though I tried some of the free browser services online they can only help so much. Funny enough, after I decided that I wasn&#8217;t going to support IE 6, I had to create a special stylesheet just for IE7 because the navigation was 1 pixel off in Explorer. Gotta love it. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=EuUWgyYbfcY:Lu8jbzB_21s:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=EuUWgyYbfcY:Lu8jbzB_21s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thepropagandaparty/~4/EuUWgyYbfcY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/design/yearly-redesign-completed/feed</wfw:commentRss>
		<feedburner:origLink>http://blog.popstalin.com/articles/design/yearly-redesign-completed</feedburner:origLink></item>
		<item>
		<title>IE6 and My Blog Redesign</title>
		<link>http://feedproxy.google.com/~r/thepropagandaparty/~3/LgWjLGYbz6c/ie6-and-my-blog-redesign</link>
		<comments>http://blog.popstalin.com/articles/css/ie6-and-my-blog-redesign#comments</comments>
		<pubDate>Sat, 11 Apr 2009 16:15:59 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/ie6-and-my-blog-redesign/</guid>
		<description><![CDATA[Making the decision to leave behind IE6 for my personal blog wasn't a hard one. I still feel as a professional, it's within my professional standards to support that horrible, antiquated browser but in my personal life it's bye-bye IE6.]]></description>
			<content:encoded><![CDATA[<p>Hey all (or all <em>two</em> of you)! I&#8217;m in the process of doing my yearly blog redesign and I&#8217;ve made the big decision <a href="http://www.bringdownie6.com/">not to support IE6</a> when the redesign is deployed. I&#8217;ll still continue to hack away for clients who insist that their IE6 crowd stays pleased but I figure the small amount of visitors I get overall probably <strong>aren&#8217;t</strong> using IE6 to begin with and the few who are, will still be able to get the information, it just won&#8217;t be pretty (they&#8217;ll also get a nice little message at the top of the page urging them to upgrade).  <span id="more-179"></span></p>
<h2>The Redesign</h2>
<p>In the redesign I am trying something new for me that will, hopefully, help with some IE6 issues off the bat. First, I&#8217;m employing a modified version of <a href="http://meyerweb.com/eric/tools/css/reset/">Eric Meyer&#8217;s reset.css</a>&#8211;I&#8217;m going to zero everything out and start from scratch. Second, I&#8217;m going to use the <strong><em>strict</em></strong> XHTML doc type opposed to transitional&#8211;IE6 is quirky enough without putting it in quirks mode. Third, I&#8217;m going to attempt to make the layout as semantic as possible&#8211;my goal is to use less div&#8217;s. Finally, I&#8217;m wading into the position:relative and position:absolute waters. I&#8217;m using some shadow effects for my design and instead of using a lot of drop-shadowed graphics, I figure if I layer things, I need two graphics instead of ten (not a real number, just tossing it out there). Another thing I&#8217;m going to attempt to do is change the way I name things. I read a great article written by Andy Clarke called &#8220;<a href="http://forabeautifulweb.com/blog/about/more_on_developing_naming_conventions_microformats_and_html5/">More on developing naming conventions, Microformats and HTML5</a>&#8221; and am going to attempt to use his model for my mark-up.</p>
<p>The redesign will be a learning process for me and that is a good thing in my mind. I&#8217;d say I have a fair handle on CSS, except for the matters I stated above, and it&#8217;s about time I master those as well. It&#8217;s been an interesting proposition thus far and I&#8217;m enjoying and frustrated by it in equal parts. Hopefully, things will work fairly well in IE6 (except for the PNG graphics that allow the transparency I&#8217;ll need) without creating a separate stylesheet or hacking my way to get an eight year old browser to behave as current browsers do. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=LgWjLGYbz6c:CetYqUOs7Gk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=LgWjLGYbz6c:CetYqUOs7Gk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thepropagandaparty/~4/LgWjLGYbz6c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/css/ie6-and-my-blog-redesign/feed</wfw:commentRss>
		<feedburner:origLink>http://blog.popstalin.com/articles/css/ie6-and-my-blog-redesign</feedburner:origLink></item>
		<item>
		<title>Using Custom Fields for Post Images</title>
		<link>http://feedproxy.google.com/~r/thepropagandaparty/~3/V2oOjZeWyrk/using-custom-fields-for-post-images</link>
		<comments>http://blog.popstalin.com/articles/wordpress/using-custom-fields-for-post-images#comments</comments>
		<pubDate>Mon, 06 Apr 2009 21:50:31 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/using-custom-fields-for-post-images/</guid>
		<description><![CDATA[<p>Sometimes a site may want a &#8220;featured&#8221; section with some text and an image. If you&#8217;re using <a href="http://codex.wordpress.org/Using_Custom_Fields">custom fields</a> to achieve this, you may want a way to keep an empty value to display. Meaning, sometimes you don&#8217;t always add the image but if in the&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Sometimes a site may want a &#8220;featured&#8221; section with some text and an image. If you&#8217;re using <a href="http://codex.wordpress.org/Using_Custom_Fields">custom fields</a> to achieve this, you may want a way to keep an empty value to display. Meaning, sometimes you don&#8217;t always add the image but if in the template you have the code to automatically pull in the image custom field, then you&#8217;ll either get alt text in place of the image or a big red &#8216;x&#8217;. Here&#8217;s a small snippet of code that will return nothing if nothing is there.</p>
<p>Just place the following code where you would normally place your custom field code:</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span> php
<span style="color: #000088;">$values</span> <span style="color: #339933;">=</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Your-Custom-Field-Value&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'site_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-content/uploads/&gt;?php $values = get_post_custom_values(&quot;Your-Custom-Field-Value&quot;); echo $values[0]; ?&gt;&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?</span> php <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>If you write a post that doesn&#8217;t have an image, you won&#8217;t get any of those pesky errors. Thanks goes to authors on the WordPress forums for their efforts in helping folks who aren&#8217;t as well-versed in PHP coding as we&#8217;d like to be. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=V2oOjZeWyrk:5B5KaFL4yoY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=V2oOjZeWyrk:5B5KaFL4yoY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thepropagandaparty/~4/V2oOjZeWyrk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/using-custom-fields-for-post-images/feed</wfw:commentRss>
		<feedburner:origLink>http://blog.popstalin.com/articles/wordpress/using-custom-fields-for-post-images</feedburner:origLink></item>
		<item>
		<title>IE6, PNGs and WordPress–It’s a Party!</title>
		<link>http://feedproxy.google.com/~r/thepropagandaparty/~3/DE5dKNi8Oug/ie6-pngs-and-wordpress-its-a-party</link>
		<comments>http://blog.popstalin.com/articles/wordpress/ie6-pngs-and-wordpress-its-a-party#comments</comments>
		<pubDate>Thu, 02 Apr 2009 13:00:19 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/ie6-pngs-and-wordpress-its-a-party/</guid>
		<description><![CDATA[I am all about the current movement to stop designing for IE6 but being the cautious woman that I am, I'm gonna wait for the numbers to go down just a bit more. I've tried a couple of the plugin's I've found for PNG transparency and still found myself looking at gray boxes in IE6. *Shakes fist in anger at IE6*]]></description>
			<content:encoded><![CDATA[<p>I am all about the current movement to stop designing for IE6 but being the cautious woman that I am, I&#8217;m gonna wait for the numbers to go down just a bit more. I&#8217;ve tried a couple of the plugin&#8217;s I&#8217;ve found for PNG transparency and still found myself looking at gray boxes in IE6. *Shakes fist in anger at IE6*</p>
<p>Then I came across this <a href="http://blog.nkadesign.com/2006/wordpress-fixing-png-transparency-issues-in-ie/">very old post</a> and it seems to have solved my woes and the gray boxes are now a thing of the past (finger&#8217;s crossed). Here&#8217;s the technique:</p>
<p>In your WordPress theme folder&#8211;wp-content/themes/&#8211;upload the following two files (from the link above)&#8211;blank.gif and pngbehavior.htc </p>
<p>Then add the following code to your stylesheet:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Fix for PNG alpha channel display in IE6 */</span>
img <span style="color: #00AA00;">&#123;</span>
 behavior<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;/wp-content/themes/pngbehavior.htc&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=DE5dKNi8Oug:egAfQkPz5PY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=DE5dKNi8Oug:egAfQkPz5PY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thepropagandaparty/~4/DE5dKNi8Oug" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/ie6-pngs-and-wordpress-its-a-party/feed</wfw:commentRss>
		<feedburner:origLink>http://blog.popstalin.com/articles/wordpress/ie6-pngs-and-wordpress-its-a-party</feedburner:origLink></item>
		<item>
		<title>A Quick Tip for Large Background Images</title>
		<link>http://feedproxy.google.com/~r/thepropagandaparty/~3/zZHCD8ia6sw/a-quick-tip-for-large-background-images</link>
		<comments>http://blog.popstalin.com/articles/css/a-quick-tip-for-large-background-images#comments</comments>
		<pubDate>Wed, 01 Apr 2009 01:28:03 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/a-quick-tip-for-large-background-images/</guid>
		<description><![CDATA[<p>I have to admit I didn&#8217;t come by this tip by way of my own epiphany but rather from the <a href="http://www.nike.com/nikeos/p/nikesoccer/en_US/">Nike soccer (football) web site</a> via <a href="http://www.smashingmagazine.com/2009/03/31/backgrounds-in-web-design-examples-and-best-practices-2/">Smashing Magazine</a>. I&#8217;m currently working on a design where the background is one large image. I considered using a jQuery&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I have to admit I didn&#8217;t come by this tip by way of my own epiphany but rather from the <a href="http://www.nike.com/nikeos/p/nikesoccer/en_US/">Nike soccer (football) web site</a> via <a href="http://www.smashingmagazine.com/2009/03/31/backgrounds-in-web-design-examples-and-best-practices-2/">Smashing Magazine</a>. I&#8217;m currently working on a design where the background is one large image. I considered using a jQuery slider script to keep all the content on the same page however I have several issues with using that method, the first and main issue being usability. As designer&#8217;s or coder&#8217;s, usability should always be the first and last thought for any project. </p>
<p>How I&#8217;ve decided to solve one of the issues is to use this bit of code I spied in Nike&#8217;s CSS code. </p>
<ol class="code">
<li><code>body { background:#fff url(images/your-image-name.jpg) fixed no-repeat;</code></li>
</ol>
<p>It&#8217;s the <strong>fixed</strong> part that makes this beautiful and so very smart. The content will scroll but the background stays in place. I love it when a solution to a problem falls into my lap like this. Now I can get rid of the sliding panel JavaScript that I was going to use and just have sections that are linked via an anchor. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=zZHCD8ia6sw:2dHCQWx-rnE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=zZHCD8ia6sw:2dHCQWx-rnE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thepropagandaparty/~4/zZHCD8ia6sw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/css/a-quick-tip-for-large-background-images/feed</wfw:commentRss>
		<feedburner:origLink>http://blog.popstalin.com/articles/css/a-quick-tip-for-large-background-images</feedburner:origLink></item>
		<item>
		<title>jQuery “Captify” Plugin</title>
		<link>http://feedproxy.google.com/~r/thepropagandaparty/~3/lqITDmjPY0o/jquery-captify-plugin</link>
		<comments>http://blog.popstalin.com/articles/design/jquery-captify-plugin#comments</comments>
		<pubDate>Mon, 02 Mar 2009 19:08:50 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/jquery-captify-plugin/</guid>
		<description><![CDATA[<p>I just came across this lovely plugin via del.icio.us. From the jQuery site:</p>
<p>Captify adds semi-transparent captions that appear on top of images when the user&#8217;s mouse rolls over them. It offers a simple way to add captions to images in a manner that doesn&#8217;t add&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I just came across this lovely plugin via del.icio.us. From the jQuery site:</p>
<blockquote><p>Captify adds semi-transparent captions that appear on top of images when the user&#8217;s mouse rolls over them. It offers a simple way to add captions to images in a manner that doesn&#8217;t add clutter to a design. Tested in IE, Firefox, Safari, and Chrome.</p></blockquote>
<p>You can view examples of how this works <a href="http://masterfidgeter.com/projects/captify/">here</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=lqITDmjPY0o:fYdnA-buDRs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thepropagandaparty?a=lqITDmjPY0o:fYdnA-buDRs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/thepropagandaparty?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thepropagandaparty/~4/lqITDmjPY0o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/design/jquery-captify-plugin/feed</wfw:commentRss>
		<feedburner:origLink>http://blog.popstalin.com/articles/design/jquery-captify-plugin</feedburner:origLink></item>
	</channel>
</rss>
