<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	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">
	<channel>
		<title>Support Forum - Topic: Calling custom fields within posts issue</title>
		<link>http://www.kriesi.at/support/topic/calling-custom-fields-within-posts-issue</link>
		<description>Support Forum - Topic: Calling custom fields within posts issue</description>
		<language>en-US</language>
		<pubDate>Sun, 19 May 2013 15:36:50 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.kriesi.at/support/search.php</link>
		</textInput>
		<atom:link href="http://www.kriesi.at/support/rss/topic/calling-custom-fields-within-posts-issue" rel="self" type="application/rss+xml" />

		<item>
			<title>Dude on "Calling custom fields within posts issue"</title>
			<link>http://www.kriesi.at/support/topic/calling-custom-fields-within-posts-issue#post-20810</link>
			<pubDate>Fri, 10 Jun 2011 06:11:50 +0000</pubDate>
			<dc:creator>Dude</dc:creator>
			<guid isPermaLink="false">20810@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Yes exactly. Many functions require a loop like the_author, the_content, etc.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Monsoon on "Calling custom fields within posts issue"</title>
			<link>http://www.kriesi.at/support/topic/calling-custom-fields-within-posts-issue#post-20717</link>
			<pubDate>Wed, 08 Jun 2011 18:39:26 +0000</pubDate>
			<dc:creator>Monsoon</dc:creator>
			<guid isPermaLink="false">20717@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;I think I just realized that you can only query certain data within the loop and not outside unless you use something like&#60;br /&#62;
global $wp_query;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Monsoon on "Calling custom fields within posts issue"</title>
			<link>http://www.kriesi.at/support/topic/calling-custom-fields-within-posts-issue#post-20714</link>
			<pubDate>Wed, 08 Jun 2011 17:44:50 +0000</pubDate>
			<dc:creator>Monsoon</dc:creator>
			<guid isPermaLink="false">20714@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;ok I think I found why you probably should add this to the functions.php of your themes&#60;/p&#62;
&#60;p&#62;I added `function get_custom_field($key, $echo = FALSE) {&#60;br /&#62;
	global $post;&#60;br /&#62;
	$custom_field = get_post_meta($post-&#38;gt;ID, $key, true);&#60;br /&#62;
	if ($echo == FALSE) return $custom_field;&#60;br /&#62;
	echo $custom_field;&#60;br /&#62;
}`&#60;/p&#62;
&#60;p&#62;and then called the meta to display using &#60;code&#62;&#38;lt;?php get_custom_field(&#38;#39;location&#38;#39;, TRUE); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;unless I am using an older version of a theme that didn t have it I would expect the wordpress query to display mets to work.&#60;/p&#62;
&#60;p&#62;Something to look into I guess. Can you confirm that only this code would work or is there any other reason why the metas can not be displayed unless you tweak the functions.php?&#60;/p&#62;
&#60;p&#62;I also tried to display custom fields in Brightbox and they are also being stripped and not displayed...just so you know
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Monsoon on "Calling custom fields within posts issue"</title>
			<link>http://www.kriesi.at/support/topic/calling-custom-fields-within-posts-issue#post-20713</link>
			<pubDate>Wed, 08 Jun 2011 17:30:30 +0000</pubDate>
			<dc:creator>Monsoon</dc:creator>
			<guid isPermaLink="false">20713@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;I have added several custom fields to a post. I also checked that I could execute php code in the post for that user.&#60;br /&#62;
If I use the &#60;code&#62;&#38;lt;?php the_meta(); ?&#38;gt;&#60;/code&#62; it shows all the metas but if I try anything with a single field for example lets say I have one meta called: Location and the other Address and I try to display them within the post they do not show at all.&#60;/p&#62;
&#60;p&#62;Is there something in the template loop that blocks this from working?&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php echo get_post_meta($post-&#38;gt;ID, &#38;#39;Location&#38;#39;, true); ?&#38;gt;&#60;/code&#62; should be working but there is no output for that query when Location is clearly there is I use &#60;code&#62;&#38;lt;?php the_meta(); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Any ideas?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
