<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WP Garage &#187; PHP</title>
	<atom:link href="http://wpgarage.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpgarage.com</link>
	<description>wordpress tricks, hacks, and tips</description>
	<lastBuildDate>Mon, 30 Aug 2010 10:34:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Automatic thumbnail image resizing options</title>
		<link>http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/</link>
		<comments>http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 14:12:54 +0000</pubDate>
		<dc:creator>Miriam Schwab</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/?p=400</guid>
		<description><![CDATA[I manage a few blogs that use thumbnail images to spruce up the appearance of the site, and make it more enjoyable for readers. As we&#8217;ve discussed here in the past, an efficient method for adding thumbnails to your blog is with custom fields. But finding the right image, resizing it (ugh), uploading, etc., is [...]]]></description>
			<content:encoded><![CDATA[<p>I manage a few blogs that use thumbnail images to spruce up the appearance of the site, and make it more enjoyable for readers. As we&#8217;ve discussed here in the past, an efficient method for <a title="Giving each WordPress post a thumbnail, and display the thumbnail on the home page" href="http://wpgarage.com/tips/giving-each-wordpress-post-a-thumbnail-and-display-the-thumbnail-on-the-home-page/">adding thumbnails to your blog is with custom fields</a>. But finding the right image, resizing it (ugh), uploading, etc., is such a pain in the neck that I often find myself not blogging because I can&#8217;t face it. On one of my blogs, I&#8217;ve just decided to post without the images, since I know it&#8217;s the only way I&#8217;ll ever publish anything.</p>
<p>So imagine my delight when I found the following two fantastic solutions: Justin Tadlock&#8217;s brilliant <a title="Get the Image WordPress plugin" href="http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin">Get the Image WordPress plugin</a> and Darren Hoyt&#8217;s <a title="TimThumb PHP Script Released" href="http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/">TimThumb PHP Script</a>. Both the plugin and the script take most of the annoying work out of inserting thumbnail images in your blog.</p>
<h3>Justin Tadlock&#8217;s Get the Image plugin</h3>
<p>This plugin works in three steps (as explained on Tadlock&#8217;s blog):</p>
<ol>
<li>It activates a script that gets an image either by custom field input or post attachment.</li>
<li>Then it <strong>tells the script what the default image size should be</strong>. It tells the script to look for the WordPress-generated thumbnail if there are no custom field images found. You can use the values “thumbnail,” “medium,” or “full” for this (those are three image sizes WordPress generates).</li>
<li>If there are no images found, the script displays a default image found at “/wp-content/my-image.jpg.”</li>
</ol>
<p>As Justin says, this has a lot of potential applications &#8211; you can use to for feature images, for displaying images in your sidebar, etc. He even offers to help users implement the plugin on their blogs if they ask in his <a title="Justin Tadlock's forums" href="http://justintadlock.com/forums">forums</a>.</p>
<h3>Darren Hoyt&#8217;s Tim Thumb PHP Script</h3>
<p>Hoyt originally created this script for use in his <a title="Mimbo Pro WordPress theme" href="http://www.darrenhoyt.com/2008/03/12/mimbo-pro-magazine-theme-released/">Mimbo Pro</a> premium WordPress theme. To use it, you need to complete two steps:</p>
<ol>
<li>Copy the <a href="http://timthumb.googlecode.com/svn/trunk/timthumb.php" target="blank">source code</a> into a new document called ‘timthumb.php’ and place it in a folder on your site (ex: /scripts/).</li>
<li>Call the source code from the place in your theme files where you want the resized image to appear as follows:<br />
<code>&lt;img src="/scripts/timthumb.php?src=/images/whatever.jpg&amp;h=150&amp;w=150&amp;zc=1" alt="" /&gt;</code></li>
</ol>
<p>This script is more complicated than Tadlock&#8217;s plugin, and when I tried it I couldn&#8217;t get it to work. But many people are happily using it in their themes.</p>
<p>Talk about filling a need. If you want to include thumbnail images on your blog without the headache, this plugin or script is a must.</p>
<p><a href="http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin">Get The Image WordPress Plugin</a></p>
<p><a title="TimThumb PHP Script" href="http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/">TimThumb PHP Script</a></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;title=Automatic+thumbnail+image+resizing+options" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;title=Automatic+thumbnail+image+resizing+options" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;title=Automatic+thumbnail+image+resizing+options&amp;desc=I%20manage%20a%20few%20blogs%20that%20use%20thumbnail%20images%20to%20spruce%20up%20the%20appearance%20of%20the%20site%2C%20and%20make%20it%20more%20enjoyable%20for%20readers.%20As%20we%27ve%20discussed%20here%20in%20the%20past%2C%20an%20efficient%20method%20for%20adding%20thumbnails%20to%20your%20blog%20is%20with%20custom%20fields.%20But%20finding%20the%20right%20image%2C%20resizing%20it%20%28ugh%29%2C%20uploading" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;t=Automatic+thumbnail+image+resizing+options" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.friendfeed.com/share?title=Automatic+thumbnail+image+resizing+options&amp;link=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Automatic+thumbnail+image+resizing+options&amp;body=Link: http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A I%20manage%20a%20few%20blogs%20that%20use%20thumbnail%20images%20to%20spruce%20up%20the%20appearance%20of%20the%20site%2C%20and%20make%20it%20more%20enjoyable%20for%20readers.%20As%20we%27ve%20discussed%20here%20in%20the%20past%2C%20an%20efficient%20method%20for%20adding%20thumbnails%20to%20your%20blog%20is%20with%20custom%20fields.%20But%20finding%20the%20right%20image%2C%20resizing%20it%20%28ugh%29%2C%20uploading" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;title=Automatic+thumbnail+image+resizing+options" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;title=Automatic+thumbnail+image+resizing+options&amp;srcUrl=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;srcTitle=Automatic+thumbnail+image+resizing+options&amp;snippet=I%20manage%20a%20few%20blogs%20that%20use%20thumbnail%20images%20to%20spruce%20up%20the%20appearance%20of%20the%20site%2C%20and%20make%20it%20more%20enjoyable%20for%20readers.%20As%20we%27ve%20discussed%20here%20in%20the%20past%2C%20an%20efficient%20method%20for%20adding%20thumbnails%20to%20your%20blog%20is%20with%20custom%20fields.%20But%20finding%20the%20right%20image%2C%20resizing%20it%20%28ugh%29%2C%20uploading" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;title=Automatic+thumbnail+image+resizing+options&amp;summary=I%20manage%20a%20few%20blogs%20that%20use%20thumbnail%20images%20to%20spruce%20up%20the%20appearance%20of%20the%20site%2C%20and%20make%20it%20more%20enjoyable%20for%20readers.%20As%20we%27ve%20discussed%20here%20in%20the%20past%2C%20an%20efficient%20method%20for%20adding%20thumbnails%20to%20your%20blog%20is%20with%20custom%20fields.%20But%20finding%20the%20right%20image%2C%20resizing%20it%20%28ugh%29%2C%20uploading&amp;source=WP Garage" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-netvibes">
			<a href="http://www.netvibes.com/share?title=Automatic+thumbnail+image+resizing+options&amp;url=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/" rel="nofollow" class="external" title="Submit this to Netvibes">Submit this to Netvibes</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;title=Automatic+thumbnail+image+resizing+options&amp;selection=I%20manage%20a%20few%20blogs%20that%20use%20thumbnail%20images%20to%20spruce%20up%20the%20appearance%20of%20the%20site%2C%20and%20make%20it%20more%20enjoyable%20for%20readers.%20As%20we%27ve%20discussed%20here%20in%20the%20past%2C%20an%20efficient%20method%20for%20adding%20thumbnails%20to%20your%20blog%20is%20with%20custom%20fields.%20But%20finding%20the%20right%20image%2C%20resizing%20it%20%28ugh%29%2C%20uploading" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;title=Automatic+thumbnail+image+resizing+options" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;title=Automatic+thumbnail+image+resizing+options" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-sphinn">
			<a href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/" rel="nofollow" class="external" title="Sphinn this on Sphinn">Sphinn this on Sphinn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/&amp;title=Automatic+thumbnail+image+resizing+options" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-techmeme">
			<a href="http://twitter.com/home/?status=Tip+@Techmeme+http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/+&quot;Automatic+thumbnail+image+resizing+options&quot;&amp;source=shareaholic" rel="nofollow" class="external" title="Tip this to TechMeme">Tip this to TechMeme</a>
		</li>
		<li class="shr-tumblr">
			<a href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwpgarage.com%2Fplugins%2Fthumbnail-image-resize-plugin-script%2F&amp;t=Automatic+thumbnail+image+resizing+options" rel="nofollow" class="external" title="Share this on Tumblr">Share this on Tumblr</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Automatic+thumbnail+image+resizing+options+-++%28via+%40wpgarage%29&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22Automatic%20thumbnail%20image%20resizing%20options%22&amp;body=Link: http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A I%20manage%20a%20few%20blogs%20that%20use%20thumbnail%20images%20to%20spruce%20up%20the%20appearance%20of%20the%20site%2C%20and%20make%20it%20more%20enjoyable%20for%20readers.%20As%20we%27ve%20discussed%20here%20in%20the%20past%2C%20an%20efficient%20method%20for%20adding%20thumbnails%20to%20your%20blog%20is%20with%20custom%20fields.%20But%20finding%20the%20right%20image%2C%20resizing%20it%20%28ugh%29%2C%20uploading" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-printfriendly">
			<a href="http://www.printfriendly.com/print?url=http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/" rel="nofollow" class="external" title="Send this page to Print Friendly">Send this page to Print Friendly</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/plugins/thumbnail-image-resize-plugin-script/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Using PHP to alternate background colors for comments or posts in WordPress</title>
		<link>http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/</link>
		<comments>http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/#comments</comments>
		<pubDate>Wed, 26 Dec 2007 15:05:10 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[posts]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/</guid>
		<description><![CDATA[Some blogs have alternating background colors for their comments and posts, i.e. a green background for every even comment and post, and a grey background for every odd comment and post. How do they do that? Alternating Comments Styles To alternate comments, add the following code to your comments.php template file, under where it says [...]]]></description>
			<content:encoded><![CDATA[<p>Some blogs have alternating background colors for their comments and posts, i.e. a green background for every even comment and post, and a grey background for every odd comment and post. How do they do that?</p>
<p><strong>Alternating Comments Styles</strong></p>
<p>To alternate comments, add the following code to your comments.php template file, under where it says <code>&lt;?php if ( $comments ) : ?&gt;</code>:</p>
<p><code>&lt;ul&gt;<br />
&lt;?php $i = 0; ?&gt;<br />
&lt;?php foreach ($comments as $comment) : ?&gt;<br />
&lt;?php $i++; ?&gt;<br />
&lt;li id="comment-&lt;?php comment_ID() ?&gt;"&lt;?php if($i&amp;1) { echo 'class="odd"';} else {echo 'class="even"';} ?&gt;&gt;</code></p>
<p>Then, create a style called .even and a style called .odd in your style.css file. Give each style a different background color, like this (but change the colors to what you want):</p>
<p><code>.odd {<br />
background-color: #fcf9fc; }</code></p>
<p><code>.even {<br />
background-color: #616161; }</code></p>
<p>This information is from the following WordPress support topic:</p>
<p><a href="http://wordpress.org/support/topic/108400">How to alternate background colors of comments posted on blog?</a></p>
<p><strong>Alternating Post Styles</strong></p>
<p>Adam Brown has a <a href="http://adambrown.info/b/widgets/easy-php-tutorial-for-wordpress-users/posts-that-have-alternating-colors/" title="How do I make my posts (or anything else) have alternating colors?">tutorial on his site for creating alternating styles for posts</a>. Basically, you do the following:</p>
<ol>
<li>Right before the loop begins, add the following code:<br />
<code>&lt;?php $odd_or_even = 'odd'; ?&gt;</code></li>
<li>Right after the loop, there will be a div. Let&#8217;s say it&#8217;s called class=&#8221;post&#8221;. Change it to<br />
<code>&lt;div class="post &lt;?php echo $odd_or_even; ?&gt;"&gt;</code>, and then add the following piece of code on the next line: <code>&lt;?php $odd_or_even = ('odd'==$odd_or_even) ? 'even' : 'odd'; ?&gt;</code></li>
<li>Now, create .odd and .even styles in your style.css.</li>
</ol>
<p>Adam&#8217;s site has another really useful <a href="http://adambrown.info/b/widgets/easy-php-tutorial-for-wordpress-users/">PHP Tutorial for WordPress Users</a>, which is good for those of us who aren&#8217;t going to become PHP gurus, but would like to know enough PHP to extend our WordPress sites.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress&amp;desc=Some%20blogs%20have%20alternating%20background%20colors%20for%20their%20comments%20and%20posts%2C%20i.e.%20a%20green%20background%20for%20every%20even%20comment%20and%20post%2C%20and%20a%20grey%20background%20for%20every%20odd%20comment%20and%20post.%20How%20do%20they%20do%20that%3F%0A%0AAlternating%20Comments%20Styles%0A%0ATo%20alternate%20comments%2C%20add%20the%20following%20code%20to%20your%20comments" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;t=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.friendfeed.com/share?title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress&amp;link=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress&amp;body=Link: http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A Some%20blogs%20have%20alternating%20background%20colors%20for%20their%20comments%20and%20posts%2C%20i.e.%20a%20green%20background%20for%20every%20even%20comment%20and%20post%2C%20and%20a%20grey%20background%20for%20every%20odd%20comment%20and%20post.%20How%20do%20they%20do%20that%3F%0A%0AAlternating%20Comments%20Styles%0A%0ATo%20alternate%20comments%2C%20add%20the%20following%20code%20to%20your%20comments" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress&amp;srcUrl=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;srcTitle=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress&amp;snippet=Some%20blogs%20have%20alternating%20background%20colors%20for%20their%20comments%20and%20posts%2C%20i.e.%20a%20green%20background%20for%20every%20even%20comment%20and%20post%2C%20and%20a%20grey%20background%20for%20every%20odd%20comment%20and%20post.%20How%20do%20they%20do%20that%3F%0A%0AAlternating%20Comments%20Styles%0A%0ATo%20alternate%20comments%2C%20add%20the%20following%20code%20to%20your%20comments" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress&amp;summary=Some%20blogs%20have%20alternating%20background%20colors%20for%20their%20comments%20and%20posts%2C%20i.e.%20a%20green%20background%20for%20every%20even%20comment%20and%20post%2C%20and%20a%20grey%20background%20for%20every%20odd%20comment%20and%20post.%20How%20do%20they%20do%20that%3F%0A%0AAlternating%20Comments%20Styles%0A%0ATo%20alternate%20comments%2C%20add%20the%20following%20code%20to%20your%20comments&amp;source=WP Garage" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-netvibes">
			<a href="http://www.netvibes.com/share?title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress&amp;url=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/" rel="nofollow" class="external" title="Submit this to Netvibes">Submit this to Netvibes</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress&amp;selection=Some%20blogs%20have%20alternating%20background%20colors%20for%20their%20comments%20and%20posts%2C%20i.e.%20a%20green%20background%20for%20every%20even%20comment%20and%20post%2C%20and%20a%20grey%20background%20for%20every%20odd%20comment%20and%20post.%20How%20do%20they%20do%20that%3F%0A%0AAlternating%20Comments%20Styles%0A%0ATo%20alternate%20comments%2C%20add%20the%20following%20code%20to%20your%20comments" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-sphinn">
			<a href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/" rel="nofollow" class="external" title="Sphinn this on Sphinn">Sphinn this on Sphinn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/&amp;title=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-techmeme">
			<a href="http://twitter.com/home/?status=Tip+@Techmeme+http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/+&quot;Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress&quot;&amp;source=shareaholic" rel="nofollow" class="external" title="Tip this to TechMeme">Tip this to TechMeme</a>
		</li>
		<li class="shr-tumblr">
			<a href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwpgarage.com%2Fcode-snippets%2Fusing-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress%2F&amp;t=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress" rel="nofollow" class="external" title="Share this on Tumblr">Share this on Tumblr</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Using+PHP+to+alternate+background+colors+for+comments+or+posts+in+WordPress+-++%28via+%40wpgarage%29&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22Using%20PHP%20to%20alternate%20background%20colors%20for%20comments%20or%20posts%20in%20WordPress%22&amp;body=Link: http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A Some%20blogs%20have%20alternating%20background%20colors%20for%20their%20comments%20and%20posts%2C%20i.e.%20a%20green%20background%20for%20every%20even%20comment%20and%20post%2C%20and%20a%20grey%20background%20for%20every%20odd%20comment%20and%20post.%20How%20do%20they%20do%20that%3F%0A%0AAlternating%20Comments%20Styles%0A%0ATo%20alternate%20comments%2C%20add%20the%20following%20code%20to%20your%20comments" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-printfriendly">
			<a href="http://www.printfriendly.com/print?url=http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/" rel="nofollow" class="external" title="Send this page to Print Friendly">Send this page to Print Friendly</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/code-snippets/using-php-to-alternate-background-colors-for-comments-or-posts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>
