<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<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>Gravity Support Forums Topic: how to get the value of a custom field?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/how-to-get-the-value-of-a-custom-field</link>
		<description>Gravity Support Forums Topic: how to get the value of a custom field?</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 10:15:14 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/how-to-get-the-value-of-a-custom-field" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "how to get the value of a custom field?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-get-the-value-of-a-custom-field#post-2753</link>
			<pubDate>Fri, 15 Jan 2010 12:06:38 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">2753@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Good Alain, was getting ready to look into your issue and see that illinoisharley has already helped you out :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "how to get the value of a custom field?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-get-the-value-of-a-custom-field#post-2751</link>
			<pubDate>Fri, 15 Jan 2010 12:02:36 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">2751@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Don't read, just keep hacking, you're doing fine.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alain on "how to get the value of a custom field?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-get-the-value-of-a-custom-field#post-2743</link>
			<pubDate>Fri, 15 Jan 2010 08:04:52 +0000</pubDate>
			<dc:creator>alain</dc:creator>
			<guid isPermaLink="false">2743@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That Illinois, I was just too ignorant of PHP... I just replaced the line with:&#60;br /&#62;
&#38;lt;?php echo get_post_meta($post-&#38;gt;ID, 'price', true); ?&#38;gt;&#60;/p&#62;
&#60;p&#62;and now everything is fine. This is very frustrating for me to move from a language were I know pretty much everything (Ruby) to something new where even the easiest things are evading me! &#60;/p&#62;
&#60;p&#62;Guess I will have to read a PHP book afterall!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "how to get the value of a custom field?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-get-the-value-of-a-custom-field#post-2739</link>
			<pubDate>Fri, 15 Jan 2010 00:54:00 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">2739@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;the_ID() &#60;strong&#62;echoes&#60;/strong&#62; the post ID, which is why that part does not work.&#60;/p&#62;
&#60;p&#62;maybe $post-&#38;gt;ID is a global not available in your single.php template  (normally it works just fine in single.php)  Have you tried doing a &#60;code&#62;&#38;lt;?php global $post; ?&#38;gt;&#60;/code&#62; before you try get_post_meta?&#60;/p&#62;
&#60;p&#62;I've run into this with the Carrington Theme from Alex King:&#60;br /&#62;
&#60;a href=&#34;http://carringtontheme.com/2009/06/remember-variable-scope/&#34; rel=&#34;nofollow&#34;&#62;http://carringtontheme.com/2009/06/remember-variable-scope/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Also, you are echoing or assigning that meta value to something, right?  The code you share here just gets the value, but you're not doing anything with it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alain on "how to get the value of a custom field?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-get-the-value-of-a-custom-field#post-2720</link>
			<pubDate>Thu, 14 Jan 2010 08:27:53 +0000</pubDate>
			<dc:creator>alain</dc:creator>
			<guid isPermaLink="false">2720@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thx Carl. Created an admin account for you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "how to get the value of a custom field?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-get-the-value-of-a-custom-field#post-2710</link>
			<pubDate>Wed, 13 Jan 2010 23:31:58 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">2710@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey Alain, hit me up via email with a WordPress login for this site and i'd be happy to take a look at how you have things setup and help you out with getting the syntax correct.  If you don't have my email address anymore you can use the Contact Us form on this site.  Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alain on "how to get the value of a custom field?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-get-the-value-of-a-custom-field#post-2709</link>
			<pubDate>Wed, 13 Jan 2010 22:33:12 +0000</pubDate>
			<dc:creator>alain</dc:creator>
			<guid isPermaLink="false">2709@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;First, let me say that I am a PHP newbie, I am more of a RoR programmer so I am a bit lost in PHP syntax which may explain the simplicity of my question...&#60;/p&#62;
&#60;p&#62;Goal: I want to have a form where people can enter the price of the item they want to sell. &#60;/p&#62;
&#60;p&#62;How: I used a custom field, gave it a 'new' name of 'price'. I used the form and when I look at the post content, the value is displayed in the  custom field section of the post edit page. Then, in my single_post page, I use the following code to display the content of the custom field and it does not work:&#60;/p&#62;
&#60;p&#62;&#38;lt;?php get_post_meta($post-&#38;gt;ID, 'price', true); ?&#38;gt;&#60;/p&#62;
&#60;p&#62;nothing is output and if I do this:&#60;/p&#62;
&#60;p&#62;&#38;lt;?php get_post_meta(the_ID(), 'price', true); ?&#38;gt;&#60;/p&#62;
&#60;p&#62;it only display the id of the post. &#60;/p&#62;
&#60;p&#62;What am I missing? I am sure I am missing something simple since all the method calls seem good.&#60;/p&#62;
&#60;p&#62;Thx.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
