<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" 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/" version="2.0">
<channel>
	<title>Comments for boosten.org</title>
	
	<link>http://www.boosten.org</link>
	<description>Description of my Adventures in Open Source Land and how I graduately became a wannabee specialist</description>
	<lastBuildDate>Thu, 04 Mar 2010 21:34:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CommentsForBoostenorg" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="commentsforboostenorg" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Comment on Using custom fields in Wordpress posts by Darren</title>
		<link>http://www.boosten.org/using-custom-fields-in-wordpress-posts/comment-page-1/#comment-477</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Thu, 04 Mar 2010 21:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.boosten.org/?p=290#comment-477</guid>
		<description>Yay! Appears to be working in IE6 even. So, the image from the custom field gets pulled in as it should. If there is no value(image in this case) for that field, a placeholder image is inserted. Thanks again!

</description>
		<content:encoded><![CDATA[<p>Yay! Appears to be working in IE6 even. So, the image from the custom field gets pulled in as it should. If there is no value(image in this case) for that field, a placeholder image is inserted. Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using custom fields in Wordpress posts by Peter Boosten</title>
		<link>http://www.boosten.org/using-custom-fields-in-wordpress-posts/comment-page-1/#comment-476</link>
		<dc:creator>Peter Boosten</dc:creator>
		<pubDate>Thu, 04 Mar 2010 19:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.boosten.org/?p=290#comment-476</guid>
		<description>The code indeed wasn't complete:

The example above should be between php tags (&lt;?php .. ?&gt;)

and then:

&lt;code&gt;&lt;img src="&lt;?php echo $thumbPath ?&gt;" alt="" /&gt;&lt;/code&gt;

The example was just to show how you could add a picture to an empty (or non existing) custom field</description>
		<content:encoded><![CDATA[<p>The code indeed wasn&#8217;t complete:</p>
<p>The example above should be between php tags (&lt;?php .. ?&gt;)</p>
<p>and then:</p>
<p><code>&lt;img src="&lt;?php echo $thumbPath ?&gt;" alt="" /&gt;</code></p>
<p>The example was just to show how you could add a picture to an empty (or non existing) custom field</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using custom fields in Wordpress posts by Darren</title>
		<link>http://www.boosten.org/using-custom-fields-in-wordpress-posts/comment-page-1/#comment-474</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Thu, 04 Mar 2010 17:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.boosten.org/?p=290#comment-474</guid>
		<description>Sorry this is not really working for me. I'm pretty new to php. I think not all the characters are showing up in your example. I need to know how to actually call the image from the custom field when there is an image as well. I had it working but not in IE and then i lost everything I did. 

How does this work without img src= or an echo?</description>
		<content:encoded><![CDATA[<p>Sorry this is not really working for me. I&#8217;m pretty new to php. I think not all the characters are showing up in your example. I need to know how to actually call the image from the custom field when there is an image as well. I had it working but not in IE and then i lost everything I did. </p>
<p>How does this work without img src= or an echo?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using custom fields in Wordpress posts by Peter Boosten</title>
		<link>http://www.boosten.org/using-custom-fields-in-wordpress-posts/comment-page-1/#comment-473</link>
		<dc:creator>Peter Boosten</dc:creator>
		<pubDate>Thu, 04 Mar 2010 14:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.boosten.org/?p=290#comment-473</guid>
		<description>You could write something like this:

&lt;code&gt;$thumbPath = get_post_meta($post-&gt;ID, 'thumbnail', true);&lt;/code&gt;

&lt;code&gt;if ($thumbPath == "") {
    $thumbPath = "comingsoon.png";
}&lt;/code&gt;
                                
&lt;code&gt;$thumbPath = "/wp-content/media/store/" . $thumbPath;&lt;/code&gt;

I would keep the images out of the template directory, but that's just my opinion.</description>
		<content:encoded><![CDATA[<p>You could write something like this:</p>
<p><code>$thumbPath = get_post_meta($post-&gt;ID, 'thumbnail', true);</code></p>
<p><code>if ($thumbPath == "") {<br />
    $thumbPath = "comingsoon.png";<br />
}</code></p>
<p><code>$thumbPath = "/wp-content/media/store/" . $thumbPath;</code></p>
<p>I would keep the images out of the template directory, but that&#8217;s just my opinion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using custom fields in Wordpress posts by Darren</title>
		<link>http://www.boosten.org/using-custom-fields-in-wordpress-posts/comment-page-1/#comment-472</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Thu, 04 Mar 2010 10:57:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.boosten.org/?p=290#comment-472</guid>
		<description>Hello,

This is great. I'm definitely bookmarking this page. I am using custom fields to pull in an image for my posts for a site I'm developing. I really like the code you have for displaying alternate text if there is no value found for a custom field. However, I would like to display a placeholder image instead of "dummy text". I would like to use a 'template_directory' php link if possible but if I have to use an absolute URL that's fine too. 

How would I do that?</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>This is great. I&#8217;m definitely bookmarking this page. I am using custom fields to pull in an image for my posts for a site I&#8217;m developing. I really like the code you have for displaying alternate text if there is no value found for a custom field. However, I would like to display a placeholder image instead of &#8220;dummy text&#8221;. I would like to use a &#8216;template_directory&#8217; php link if possible but if I have to use an absolute URL that&#8217;s fine too. </p>
<p>How would I do that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using custom fields in Wordpress posts by Peter Boosten</title>
		<link>http://www.boosten.org/using-custom-fields-in-wordpress-posts/comment-page-1/#comment-461</link>
		<dc:creator>Peter Boosten</dc:creator>
		<pubDate>Sun, 14 Feb 2010 19:32:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.boosten.org/?p=290#comment-461</guid>
		<description>Hi Arturo,

There are several solutions to this problem:

First of all, you could display the list as an unordered list (like in the example)m and style the list via css:

(enclose the unordered list with &lt;div id="inline-list"&gt;)

#inline-list ul, #inline-list li {
	display: inline;
	margin: 0;
	padding: 0;
	}

#inline-list-gen ul li:after {
	content: ", ";
	}
		
#inline-list-gen ul li.last:after {
	content: " ";
	}

The advandage is that it's still a list (for screen readers, for instance), but the disadvantage is thet these pseudo elements don't work in every browser. Maybe some javascript could solve that problem (I do not know of one, google is your friend).

I suspect however that you've abandoned the unordered list alltogether, so you would have to detect when the list ends. One possible solution would be this:

$thanks = get_post_meta($post-&gt;ID, 'thanks', false);
 
if ($thanks) {
  $counter=1;
  foreach ($thanks as $person) {
    if ($counter &gt; 1) echo ", ";
    echo $person;
    $counter++;
  }
}

The trick here is to display the comma &lt;em&gt;in front of&lt;/em&gt; the field, but not before the first one.</description>
		<content:encoded><![CDATA[<p>Hi Arturo,</p>
<p>There are several solutions to this problem:</p>
<p>First of all, you could display the list as an unordered list (like in the example)m and style the list via css:</p>
<p>(enclose the unordered list with &lt;div id=&#8221;inline-list&#8221;&gt;)</p>
<p>#inline-list ul, #inline-list li {<br />
	display: inline;<br />
	margin: 0;<br />
	padding: 0;<br />
	}</p>
<p>#inline-list-gen ul li:after {<br />
	content: &#8220;, &#8220;;<br />
	}</p>
<p>#inline-list-gen ul li.last:after {<br />
	content: &#8221; &#8220;;<br />
	}</p>
<p>The advandage is that it&#8217;s still a list (for screen readers, for instance), but the disadvantage is thet these pseudo elements don&#8217;t work in every browser. Maybe some javascript could solve that problem (I do not know of one, google is your friend).</p>
<p>I suspect however that you&#8217;ve abandoned the unordered list alltogether, so you would have to detect when the list ends. One possible solution would be this:</p>
<p>$thanks = get_post_meta($post-&gt;ID, &#8216;thanks&#8217;, false);</p>
<p>if ($thanks) {<br />
  $counter=1;<br />
  foreach ($thanks as $person) {<br />
    if ($counter &gt; 1) echo &#8220;, &#8220;;<br />
    echo $person;<br />
    $counter++;<br />
  }<br />
}</p>
<p>The trick here is to display the comma <em>in front of</em> the field, but not before the first one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using custom fields in Wordpress posts by arturo</title>
		<link>http://www.boosten.org/using-custom-fields-in-wordpress-posts/comment-page-1/#comment-460</link>
		<dc:creator>arturo</dc:creator>
		<pubDate>Sat, 13 Feb 2010 22:31:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.boosten.org/?p=290#comment-460</guid>
		<description>Very useful article.

I used the above code to output something like this: field1, field2, field3
Problem is I get: field1, field2, field3, (notice the last comma)

Can this be eliminated?</description>
		<content:encoded><![CDATA[<p>Very useful article.</p>
<p>I used the above code to output something like this: field1, field2, field3<br />
Problem is I get: field1, field2, field3, (notice the last comma)</p>
<p>Can this be eliminated?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A primer on writing WordPress plugins by Kożuchy Ekologiczne</title>
		<link>http://www.boosten.org/a-primer-on-writing-wordpress-plugins/comment-page-1/#comment-450</link>
		<dc:creator>Kożuchy Ekologiczne</dc:creator>
		<pubDate>Tue, 26 Jan 2010 10:30:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.boosten.org/?p=234#comment-450</guid>
		<description>To be straight I full concord with Your substance.</description>
		<content:encoded><![CDATA[<p>To be straight I full concord with Your substance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Page Templates in Wordpress by fedude</title>
		<link>http://www.boosten.org/page-templates-in-wordpress/comment-page-1/#comment-437</link>
		<dc:creator>fedude</dc:creator>
		<pubDate>Mon, 04 Jan 2010 00:15:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.boosten.org/?p=399#comment-437</guid>
		<description>Peter,

Thanks.  I guess it's just confusing to a noob like me that the loop code retrieves "posts" but my template is trying to display a "page".  It's hard to understand that WP treats them both the same.  This might be worth a little explanation on your blog if you have a slow day....

Thanks for your help.  Suddenly pages based uopn my template display the content.</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>Thanks.  I guess it&#8217;s just confusing to a noob like me that the loop code retrieves &#8220;posts&#8221; but my template is trying to display a &#8220;page&#8221;.  It&#8217;s hard to understand that WP treats them both the same.  This might be worth a little explanation on your blog if you have a slow day&#8230;.</p>
<p>Thanks for your help.  Suddenly pages based uopn my template display the content.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Page Templates in Wordpress by Peter Boosten</title>
		<link>http://www.boosten.org/page-templates-in-wordpress/comment-page-1/#comment-436</link>
		<dc:creator>Peter Boosten</dc:creator>
		<pubDate>Sun, 03 Jan 2010 21:37:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.boosten.org/?p=399#comment-436</guid>
		<description>Ah, oke, it's the same as for page.php, or for single.php for that matter:

               &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
                        &lt;?php the_title(); ?&gt;
                        &lt;?php the_content('Read the rest of this page »'); ?&gt;
                &lt;?php endwhile; endif; ?&gt;

Or in short: &lt;a href="http://codex.wordpress.org/The_Loop_in_Action" rel="nofollow"&gt;the loop&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Ah, oke, it&#8217;s the same as for page.php, or for single.php for that matter:</p>
<p>               &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;<br />
                        &lt;?php the_title(); ?&gt;<br />
                        &lt;?php the_content(&#8216;Read the rest of this page &raquo;&#8217;); ?&gt;<br />
                &lt;?php endwhile; endif; ?&gt;</p>
<p>Or in short: <a href="http://codex.wordpress.org/The_Loop_in_Action" rel="nofollow">the loop</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
