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

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

<channel>
<title>WordPress &#8250; Support User Favorites: indojepang</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support User Favorites: indojepang</description>
<language>en</language>
<pubDate>Thu, 26 Nov 2009 06:20:29 +0000</pubDate>

<item>
<title>philpeter on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-1202714</link>
<pubDate>Mon, 07 Sep 2009 12:26:34 +0000</pubDate>
<dc:creator>philpeter</dc:creator>
<guid isPermaLink="false">1202714@http://wordpress.org/support/</guid>
<description>&#60;blockquote&#62;&#60;p&#62;`query_posts(array(&#60;br /&#62;
	&#34;post__not_in&#34;		=&#38;gt;	get_option(&#34;sticky_posts&#34;)&#60;br /&#62;
));`&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I've used this solution but it's not working for me. I'm using it in the second loop in my home.php file, which is preceded by wp_reset_query().&#60;/p&#62;
&#60;p&#62;The first loop uses this wp_query:&#60;br /&#62;
&#60;code&#62;query_posts(array(&#38;#39;post__in&#38;#39;=&#38;gt;get_option(&#38;#39;sticky_posts&#38;#39;)));&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;The second uses:&#60;br /&#62;
&#60;code&#62;query_posts(array(&#38;quot;post__not_in&#38;quot;=&#38;gt;get_option(&#38;quot;sticky_posts&#38;quot;)));&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;But I see the same (sticky) post as the first post produced by both loops. In date order it would be the third post.&#60;/p&#62;
&#60;p&#62;Any idea why this wouldn't work?
&#60;/p&#62;</description>
</item>
<item>
<title>termserv on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-1124199</link>
<pubDate>Thu, 02 Jul 2009 20:56:18 +0000</pubDate>
<dc:creator>termserv</dc:creator>
<guid isPermaLink="false">1124199@http://wordpress.org/support/</guid>
<description>&#60;p&#62;I'm bumping this.&#60;/p&#62;
&#60;p&#62;I want to use the loop as I usually would, except I'm using query_posts to get the posts from a specific category. How can I use query_posts and still get the sticky posts at the top?
&#60;/p&#62;</description>
</item>
<item>
<title>pumpkindoodle on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-1121409</link>
<pubDate>Tue, 30 Jun 2009 13:57:52 +0000</pubDate>
<dc:creator>pumpkindoodle</dc:creator>
<guid isPermaLink="false">1121409@http://wordpress.org/support/</guid>
<description>&#60;p&#62;I'm having a different problem, using Atahualpa, where I have query_posts to include only one category on homepage:&#60;/p&#62;
&#60;p&#62;&#38;lt;?php&#60;br /&#62;
if (is_home()) {&#60;br /&#62;
query_posts(&#34;cat=4&#34;);&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;&#60;/p&#62;
&#60;p&#62;but when I use that, the formatting I've applied to sticky posts disappears.  Atahualpa folks say it's not their issue.  Any thoughts?
&#60;/p&#62;</description>
</item>
<item>
<title>focused313 on "conditional image thumbnail on main blog page"</title>
<link>http://wordpress.org/support/topic/226855#post-1117589</link>
<pubDate>Fri, 26 Jun 2009 16:28:36 +0000</pubDate>
<dc:creator>focused313</dc:creator>
<guid isPermaLink="false">1117589@http://wordpress.org/support/</guid>
<description>&#60;p&#62;thanks Simon J, that worked much better than what I had on one of my sites. I think the script I had was also too heavy. Now I just have to make that thumbnail link to the post which shouldn't be too hard.
&#60;/p&#62;</description>
</item>
<item>
<title>milet22 on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-1086218</link>
<pubDate>Fri, 29 May 2009 03:54:43 +0000</pubDate>
<dc:creator>milet22</dc:creator>
<guid isPermaLink="false">1086218@http://wordpress.org/support/</guid>
<description>&#60;p&#62;thank you jordiromkema and nathan!&#60;/p&#62;
&#60;p&#62;nathan's definite guide to sticky posts has been invaluable, and jordironmkema, the post_not_in code elegantly replaces a hacked block of code.&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>chico203 on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-1040555</link>
<pubDate>Wed, 08 Apr 2009 17:55:56 +0000</pubDate>
<dc:creator>chico203</dc:creator>
<guid isPermaLink="false">1040555@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Thanks a lot, this help me !
&#60;/p&#62;</description>
</item>
<item>
<title>jteg on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-1038478</link>
<pubDate>Mon, 06 Apr 2009 18:16:35 +0000</pubDate>
<dc:creator>jteg</dc:creator>
<guid isPermaLink="false">1038478@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Sometimes asking a question is just what it takes to solve the problem. &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
if (get_option(&#38;#39;sticky_posts&#38;#39;)) {

// Do this if there is any sticky post.

}

else {

// Do this if there isnt.

}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>jteg on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-1038471</link>
<pubDate>Mon, 06 Apr 2009 18:09:52 +0000</pubDate>
<dc:creator>jteg</dc:creator>
<guid isPermaLink="false">1038471@http://wordpress.org/support/</guid>
<description>&#60;p&#62;wprabbit: Did you solve your issue? &#60;/p&#62;
&#60;p&#62;I have the same problem: if there's no sticky post the loop is returning 10 regular posts.
&#60;/p&#62;</description>
</item>
<item>
<title>indojepang on "In sidebar list all posts in this post's category"</title>
<link>http://wordpress.org/support/topic/170970#post-972511</link>
<pubDate>Sun, 01 Feb 2009 03:37:07 +0000</pubDate>
<dc:creator>indojepang</dc:creator>
<guid isPermaLink="false">972511@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Many thanks holney this solve my problem :D&#60;br /&#62;
one thing though.. how can I exclude the active post?
&#60;/p&#62;</description>
</item>
<item>
<title>MichaelH on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-969299</link>
<pubDate>Wed, 28 Jan 2009 21:31:07 +0000</pubDate>
<dc:creator>MichaelH</dc:creator>
<guid isPermaLink="false">969299@http://wordpress.org/support/</guid>
<description>&#60;p&#62;@nathanrice&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;The possibilities of the sticky options are much greater than just &#34;sticking a post to the homepage&#34;. &#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;If you have more examples or ideas, please add them to the Codex and thanks for doing so.
&#60;/p&#62;</description>
</item>
<item>
<title>MichaelH on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-969297</link>
<pubDate>Wed, 28 Jan 2009 21:29:53 +0000</pubDate>
<dc:creator>MichaelH</dc:creator>
<guid isPermaLink="false">969297@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Incorporated some of the ideas from this thread into:&#60;br /&#62;
&#60;a href=&#34;http://codex.wordpress.org/Template_Tags/query_posts#Sticky_Post_Parameters&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Template_Tags/query_posts#Sticky_Post_Parameters&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>jordiromkema on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-968840</link>
<pubDate>Wed, 28 Jan 2009 13:58:10 +0000</pubDate>
<dc:creator>jordiromkema</dc:creator>
<guid isPermaLink="false">968840@http://wordpress.org/support/</guid>
<description>&#60;p&#62;I used:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;query_posts(array(
	&#38;quot;post__not_in&#38;quot;		=&#38;gt;	get_option(&#38;quot;sticky_posts&#38;quot;)
));&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;to get rid of all the sticky posts in the loop. Strange that it's not in the documentation. Worked for me, hope it works for you too :)
&#60;/p&#62;</description>
</item>
<item>
<title>Hiroaki Miyashita on "[Plugin: Custom Field Template] Pretty Good"</title>
<link>http://wordpress.org/support/topic/209240#post-950430</link>
<pubDate>Fri, 09 Jan 2009 13:09:37 +0000</pubDate>
<dc:creator>Hiroaki Miyashita</dc:creator>
<guid isPermaLink="false">950430@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi C0BALT,&#60;br /&#62;
I released the version 0.8. I added the blank option. If you set &#60;code&#62;blank = true&#60;/code&#62; attribute, the value will be saved if it is blank.&#60;br /&#62;
Please try it out. Thanks.
&#60;/p&#62;</description>
</item>
<item>
<title>C0BALT on "[Plugin: Custom Field Template] Pretty Good"</title>
<link>http://wordpress.org/support/topic/209240#post-943393</link>
<pubDate>Sat, 03 Jan 2009 06:48:25 +0000</pubDate>
<dc:creator>C0BALT</dc:creator>
<guid isPermaLink="false">943393@http://wordpress.org/support/</guid>
<description>&#60;p&#62;This is a very good plugin.&#60;br /&#62;
I'm having a slightly different problem around having &#34;blank&#34; custom fields.&#60;/p&#62;
&#60;p&#62;I would like to force appending a single space into a text area to prevent the sql-data entry from disappearing.&#60;/p&#62;
&#60;p&#62;I have 12 posts (of a specific category) which are cleared (not deleted) via cron at midnight every day. These posts are then editable by editors through-out the day with up to the minute information via the custom-fields plugin.
&#60;/p&#62;</description>
</item>
<item>
<title>wprabbit on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-935707</link>
<pubDate>Wed, 24 Dec 2008 05:55:09 +0000</pubDate>
<dc:creator>wprabbit</dc:creator>
<guid isPermaLink="false">935707@http://wordpress.org/support/</guid>
<description>&#60;p&#62;I am working on a new site and wanted to use the new sticky function to create a highlight area (&#34;Items to watch&#34;).  Otto's solution works great to pull the sticky posts out, but if there are no sticky posts, it is returning the regular stream of posts and spits out the number of them defined in the settings panel.&#60;/p&#62;
&#60;p&#62;anyone have a way to degrade something like this in case there are no posts specified as sticky?
&#60;/p&#62;</description>
</item>
<item>
<title>wordpredia on "[Plugin: Custom Field Template] Pretty Good"</title>
<link>http://wordpress.org/support/topic/209240#post-934753</link>
<pubDate>Tue, 23 Dec 2008 10:39:12 +0000</pubDate>
<dc:creator>wordpredia</dc:creator>
<guid isPermaLink="false">934753@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Great!&#60;br /&#62;
Is it possible  when a user mark the right answer add a point to the user profile/account?
&#60;/p&#62;</description>
</item>
<item>
<title>reececonrad on ""Sticky" Qualifier for query_posts"</title>
<link>http://wordpress.org/support/topic/208037#post-934241</link>
<pubDate>Mon, 22 Dec 2008 21:56:17 +0000</pubDate>
<dc:creator>reececonrad</dc:creator>
<guid isPermaLink="false">934241@http://wordpress.org/support/</guid>
<description>&#60;p&#62;lairdf, did you figure it out?  I'm trying to do the exact same thing.  can't get a query returned that excludes the sticky posts.
&#60;/p&#62;</description>
</item>
<item>
<title>kevinandamanda on "Custom Fields outside of loop"</title>
<link>http://wordpress.org/support/topic/149530#post-931693</link>
<pubDate>Sat, 20 Dec 2008 05:30:21 +0000</pubDate>
<dc:creator>kevinandamanda</dc:creator>
<guid isPermaLink="false">931693@http://wordpress.org/support/</guid>
<description>&#60;p&#62;endortrails &#38;#38; Kafkaesqui, you guys are GENIUSES!!! :) Thank you so much, this is exactly what I was looking for!! :) Live example on this page:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.kevinandamanda.com/recipes/&#34; rel=&#34;nofollow&#34;&#62;http://www.kevinandamanda.com/recipes/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thank you again! :)
&#60;/p&#62;</description>
</item>
<item>
<title>indojepang on "conditional image thumbnail on main blog page"</title>
<link>http://wordpress.org/support/topic/226855#post-931115</link>
<pubDate>Fri, 19 Dec 2008 17:59:36 +0000</pubDate>
<dc:creator>indojepang</dc:creator>
<guid isPermaLink="false">931115@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Justin has already released plugin for this -&#38;gt; &#60;a href=&#34;http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin&#34;&#62;http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>SimonJ on "conditional image thumbnail on main blog page"</title>
<link>http://wordpress.org/support/topic/226855#post-930982</link>
<pubDate>Fri, 19 Dec 2008 15:52:37 +0000</pubDate>
<dc:creator>SimonJ</dc:creator>
<guid isPermaLink="false">930982@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Ok...&#60;/p&#62;
&#60;p&#62;And here is the solution for the code using the custom field :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
$image = get_post_meta($post-&#38;gt;ID, &#38;#39;thumbnail&#38;#39;, true);
$link = get_permalink($post-&#38;gt;ID);
if ($image == &#38;#39;&#38;#39;) {
echo &#38;#39;&#38;#39;;
}
else {
echo  &#38;#39;&#38;lt;a href=&#38;quot;&#38;#39;.$link.&#38;#39;&#38;quot; title=&#38;quot;&#38;#39;.$post-&#38;gt;post_title.&#38;#39;&#38;quot;&#38;gt;&#38;lt;img src=&#38;quot;&#38;#39;.$image.&#38;#39;&#38;quot; alt=&#38;quot;&#38;quot; /&#38;gt;&#38;lt;/a&#38;gt;&#38;#39;;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I made a mistake with the if contidition :&#60;/p&#62;
&#60;p&#62;My mistake :&#60;br /&#62;
&#60;code&#62;if ($image == 0)&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;It should be :&#60;br /&#62;
&#60;code&#62;if ($image == &#38;#39;&#38;#39;)&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;S.
&#60;/p&#62;</description>
</item>
<item>
<title>SimonJ on "conditional image thumbnail on main blog page"</title>
<link>http://wordpress.org/support/topic/226855#post-930962</link>
<pubDate>Fri, 19 Dec 2008 15:29:43 +0000</pubDate>
<dc:creator>SimonJ</dc:creator>
<guid isPermaLink="false">930962@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hola Jonny&#60;/p&#62;
&#60;p&#62;This error message means one thing : you likely have a space, a break line or a blank character in : functions.php at the line 433.&#60;/p&#62;
&#60;p&#62;It's a usual error read here.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://codex.wordpress.org/Answers-Trouble_Shooting#Headers_already_sent&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Answers-Trouble_Shooting#Headers_already_sent&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;To avoid this kind of error, always edit your file with a good text editor, like notepad++&#60;/p&#62;
&#60;p&#62;You can read the solutions in the codex page I linked above.&#60;/p&#62;
&#60;p&#62;To repair it fast, just upload a fresh copy of functions.php from the original theme folder you downloaded.&#60;/p&#62;
&#60;p&#62;---&#60;/p&#62;
&#60;p&#62;For the first code I gave you, I didn't test it with a custom field, I just putted your original line as the first varable. But I'm pretty sure the rest of the code should work...&#60;/p&#62;
&#60;p&#62;But for the functions I gave you in my second message, I'm 100% sure it should work...  I use it in almost all my sites and have it in my test installation with the last WP version. It works pretty well without the &#34;header already sent&#34; error. This error is not relative to the function itself.&#60;/p&#62;
&#60;p&#62;Just repair your functions.php and add the function with a good text editor, it should work.&#60;/p&#62;
&#60;p&#62;S.
&#60;/p&#62;</description>
</item>
<item>
<title>jonnyburch on "conditional image thumbnail on main blog page"</title>
<link>http://wordpress.org/support/topic/226855#post-930801</link>
<pubDate>Fri, 19 Dec 2008 12:16:02 +0000</pubDate>
<dc:creator>jonnyburch</dc:creator>
<guid isPermaLink="false">930801@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Thanks simon - &#60;/p&#62;
&#60;p&#62;Unfortunately I tried putting your code into my functions.php and got this error whenever i tried to do anything else:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;Warning: Cannot modify header information - headers already sent by (output started at /home/MY SITE NAME/wp-content/themes/geex3m/functions.php:433) in /home/MY SITE NAME/wp-admin/theme-editor.php on line 62
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;also the first code looks like it should work really well but doesn't&#60;br /&#62;
Im sure it's something im doing wrong... that warning message has got me worried though. I have now got rid of the code but it's still doing it.
&#60;/p&#62;</description>
</item>
<item>
<title>SimonJ on "conditional image thumbnail on main blog page"</title>
<link>http://wordpress.org/support/topic/226855#post-930236</link>
<pubDate>Thu, 18 Dec 2008 21:39:32 +0000</pubDate>
<dc:creator>SimonJ</dc:creator>
<guid isPermaLink="false">930236@http://wordpress.org/support/</guid>
<description>&#60;p&#62;By the way, I wrote a simple function to display the thumbnail of the first image attached to a post.&#60;/p&#62;
&#60;p&#62;As I can see, you use the custom field to display your thumbnail. But you don't need to do so. You can automatically display a thumbnail if you uploaded an image via the write post interface.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function the_post_thumbnail() {
global $wpdb;
global $post;
$thumb = $wpdb-&#38;gt;get_var(&#38;quot;SELECT ID FROM $wpdb-&#38;gt;posts where post_parent= $post-&#38;gt;ID and post_type = &#38;#39;attachment&#38;#39;&#38;quot;);
$thumbnail = wp_get_attachment_thumb_url($thumb);
if ($thumb == 0) {
echo &#38;#39;&#38;#39;;
}
else {
echo &#38;#39;&#38;lt;img src=&#38;quot;&#38;#39;.$thumbnail.&#38;#39;&#38;quot; alt=&#38;quot;&#38;quot; /&#38;gt;&#38;#39;;
}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;With this function in your functions.php (in your theme directory), you just have to use :&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php the_post_thumbnail();?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Anywhere in your loop to display the thumbnail...  :-)&#60;/p&#62;
&#60;p&#62;S.
&#60;/p&#62;</description>
</item>
<item>
<title>SimonJ on "conditional image thumbnail on main blog page"</title>
<link>http://wordpress.org/support/topic/226855#post-930220</link>
<pubDate>Thu, 18 Dec 2008 21:21:30 +0000</pubDate>
<dc:creator>SimonJ</dc:creator>
<guid isPermaLink="false">930220@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi Jonny,&#60;/p&#62;
&#60;p&#62;Replace your code with this one, it should work :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
$image = get_post_meta($post-&#38;gt;ID, &#38;#39;thumbnail&#38;#39;, true);
$link = get_permalink($post-&#38;gt;ID);
if ($image == 0) {
echo &#38;#39;&#38;#39;;
}
else {
echo  &#38;#39;&#38;lt;a href=&#38;quot;&#38;#39;.$link.&#38;#39;&#38;quot; title=&#38;quot;&#38;#39;.$post-&#38;gt;post_title.&#38;#39;&#38;quot;&#38;gt;&#38;lt;img src=&#38;quot;&#38;#39;.$image.&#38;#39;&#38;quot; alt=&#38;quot;&#38;quot; /&#38;gt;&#38;lt;/a&#38;gt;&#38;#39;;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This code looks if your $image variable is empty (if ($image == 0))&#60;/p&#62;
&#60;p&#62;If so, it echoes nothing.&#60;/p&#62;
&#60;p&#62;If there is something, it echoes the img tag enclosed in a link to the post.&#60;/p&#62;
&#60;p&#62;I'm far than being a php guru, so maybe there is a more fancy way to write it, but as I said, it should work... :-)&#60;/p&#62;
&#60;p&#62;S.
&#60;/p&#62;</description>
</item>
<item>
<title>Dgold on "[Plugin: Custom Field Template] Pretty Good"</title>
<link>http://wordpress.org/support/topic/209240#post-930169</link>
<pubDate>Thu, 18 Dec 2008 20:15:08 +0000</pubDate>
<dc:creator>Dgold</dc:creator>
<guid isPermaLink="false">930169@http://wordpress.org/support/</guid>
<description>&#60;p&#62;You're welcome.  I was very happy too when someone showed me that type of code on here earlier.
&#60;/p&#62;</description>
</item>
<item>
<title>CowboyFrank on "[Plugin: Custom Field Template] Pretty Good"</title>
<link>http://wordpress.org/support/topic/209240#post-930006</link>
<pubDate>Thu, 18 Dec 2008 17:27:03 +0000</pubDate>
<dc:creator>CowboyFrank</dc:creator>
<guid isPermaLink="false">930006@http://wordpress.org/support/</guid>
<description>&#60;p&#62;&#60;strong&#62;WOW!&#60;/strong&#62; Thanks so much! Works perfectly.
&#60;/p&#62;</description>
</item>
<item>
<title>jonnyburch on "conditional image thumbnail on main blog page"</title>
<link>http://wordpress.org/support/topic/226855#post-929983</link>
<pubDate>Thu, 18 Dec 2008 16:48:49 +0000</pubDate>
<dc:creator>jonnyburch</dc:creator>
<guid isPermaLink="false">929983@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi, I am having a real issue with a website - I have managed to place thumbnails of post images on the front page of my website but some of the posts will not have images attached and at the moment that just leaves them with a blank space - I am very new to php and cannot code the appropriate if/else bit that excludes the thumbnail box when there isnt an image available.&#60;/p&#62;
&#60;p&#62;This is what i have so far:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php $image = get_post_meta($post-&#38;gt;ID, &#38;#39;thumbnail&#38;#39;, true); ?&#38;gt;
&#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink() ?&#38;gt;&#38;quot; title=&#38;quot;&#38;lt;?php the_title(); ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;img src=&#38;quot;&#38;lt;?php echo $image; ?&#38;gt;&#38;quot; alt=&#38;quot;&#38;quot; /&#38;gt;&#38;lt;/a&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I have tried various things but always end up bodging them.&#60;br /&#62;
some help would be most appreciated.&#60;/p&#62;
&#60;p&#62;Jonny
&#60;/p&#62;</description>
</item>
<item>
<title>Dgold on "[Plugin: Custom Field Template] Pretty Good"</title>
<link>http://wordpress.org/support/topic/209240#post-929194</link>
<pubDate>Wed, 17 Dec 2008 23:32:48 +0000</pubDate>
<dc:creator>Dgold</dc:creator>
<guid isPermaLink="false">929194@http://wordpress.org/support/</guid>
<description>&#60;p&#62;@ CowboyFrank, try something like this&#60;/p&#62;
&#60;p&#62;It says IF your custom field key's value == '' BLANK, then (do nothing), or you could put something here like printing &#34;There's not a thumbnail for this post because I forgot to put one&#34;&#60;/p&#62;
&#60;p&#62;ELSE, IF it isn't blank, then echo the value (prints your thumbnail).&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
$yourthumbnailkey_values = get_post_meta($post-&#38;gt;ID, &#38;#39;Thumbnail&#38;#39;, true);
if ($yourthumbnailkey_values == &#38;#39;&#38;#39;)
{ ?&#38;gt;

&#38;lt;?php } else { ?&#38;gt;

&#38;lt;?php echo $yourthumbnailkey_values; ?&#38;gt;

&#38;lt;?php } ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Hope that works for ya!  I found it very useful.
&#60;/p&#62;</description>
</item>
<item>
<title>CowboyFrank on "[Plugin: Custom Field Template] Pretty Good"</title>
<link>http://wordpress.org/support/topic/209240#post-929048</link>
<pubDate>Wed, 17 Dec 2008 21:43:27 +0000</pubDate>
<dc:creator>CowboyFrank</dc:creator>
<guid isPermaLink="false">929048@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Uh Oh! I'm using the code I posted above:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php $mykey_values = get_post_custom_values(&#38;#39;Thumbnail&#38;#39;);
  foreach ( $mykey_values as $key =&#38;gt; $value ) { echo &#38;quot;$value&#38;quot;; }?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;...Which works fine where there's a value assigned to the corresponding custom field (Thumbnail, in this example). However, though the codex documentation (&#60;a href=&#34;http://codex.wordpress.org/Function_Reference/get_post_custom_values&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Function_Reference/get_post_custom_values&#60;/a&#62;) says that a custom field left blank will return nothing, I get this error for any post that does not have content in the custom field:&#60;br /&#62;
&#60;code&#62;Warning: Invalid argument supplied for foreach() in path/single.php on line X&#60;/code&#62;&#60;br /&#62;
(Actual path truncated and line number removed.) Do I need some kind of &#34;if&#34; piece of code, to ensure that a blank custom field will return nothing? I'm a total noob with PHP, so I'd need this spelled out for me. &#60;/p&#62;
&#60;p&#62;I can give practical examples if necessary. Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>Hiroaki Miyashita on "[Plugin: Custom Field Template] Pretty Good"</title>
<link>http://wordpress.org/support/topic/209240#post-925861</link>
<pubDate>Mon, 15 Dec 2008 14:42:53 +0000</pubDate>
<dc:creator>Hiroaki Miyashita</dc:creator>
<guid isPermaLink="false">925861@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Great! Send me the file to &#60;code&#62;webmaster[at]wordpressgogo.com&#60;/code&#62;. I will include it in the next release. If you have your site, I will link to it from the plugin page. So, let me know. Thank you!!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
