<?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: Post Field = Custom Field, File Upload Displayed on Single.php</title>
		<link>https://legacy.forums.gravityhelp.com/topic/post-field-custom-field-file-upload-displayed-on-singlephp</link>
		<description>Gravity Support Forums Topic: Post Field = Custom Field, File Upload Displayed on Single.php</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 05:20:45 +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/post-field-custom-field-file-upload-displayed-on-singlephp" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Post Field = Custom Field, File Upload Displayed on Single.php"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-field-custom-field-file-upload-displayed-on-singlephp#post-39186</link>
			<pubDate>Fri, 28 Oct 2011 00:15:38 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">39186@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;uncgure, you might want to update your code to make the XHTML valid and prevent problems in the future.  You need to quote the URL:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
&#38;lt;h3&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php echo get_post_meta($post-&#38;gt;ID, &#38;#39;file_attachment&#38;#39;, true); ?&#38;gt;&#38;quot; title=&#38;quot;Download&#38;quot;&#38;gt;Download&#38;lt;/a&#38;gt;&#38;lt;/h3&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>David Smith on "Post Field = Custom Field, File Upload Displayed on Single.php"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-field-custom-field-file-upload-displayed-on-singlephp#post-39116</link>
			<pubDate>Thu, 27 Oct 2011 12:52:15 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">39116@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi uncgure,&#60;/p&#62;
&#60;p&#62;Yep, my response was intended to be a starting point. Glad you were able to get this working. :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>uncgure on "Post Field = Custom Field, File Upload Displayed on Single.php"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-field-custom-field-file-upload-displayed-on-singlephp#post-39092</link>
			<pubDate>Thu, 27 Oct 2011 10:03:43 +0000</pubDate>
			<dc:creator>uncgure</dc:creator>
			<guid isPermaLink="false">39092@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks David!  That at least makes it display the custom field value (which is currently just a text-string, but I needed to convert to an URL).&#60;/p&#62;
&#60;p&#62;I did some additional tweaks, but nothing fancy and it seemed to work with this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;h3&#38;gt;&#38;lt;a href=&#38;lt;?php echo get_post_meta($post-&#38;gt;ID, &#38;#39;file_attachment&#38;#39;, true); ?&#38;gt;&#38;gt;Download&#38;lt;/a&#38;gt;&#38;lt;/h3&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>David Smith on "Post Field = Custom Field, File Upload Displayed on Single.php"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-field-custom-field-file-upload-displayed-on-singlephp#post-38915</link>
			<pubDate>Tue, 25 Oct 2011 17:34:21 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">38915@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi uncgure,&#60;/p&#62;
&#60;p&#62;1 - When you view the post in the admin, can you see that the custom field has a value?&#60;br /&#62;
2 - You might consider retrieving the custom field like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
&#38;lt;?php echo get_post_meta($post-&#38;gt;ID, &#38;#39;file_attachment&#38;#39;, true); ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>uncgure on "Post Field = Custom Field, File Upload Displayed on Single.php"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/post-field-custom-field-file-upload-displayed-on-singlephp#post-38893</link>
			<pubDate>Tue, 25 Oct 2011 13:39:05 +0000</pubDate>
			<dc:creator>uncgure</dc:creator>
			<guid isPermaLink="false">38893@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I am using WP 3.2.1, and Gravity Forms 1.5.3. No other plugins and currently using Theme &#34;twenty eleven 1.2&#34;&#60;br /&#62;
===========================&#60;br /&#62;
What I am doing seems to be pretty easy, but I may be missing something.&#60;/p&#62;
&#60;p&#62;I created a GForm using the following POST Fields:&#60;br /&#62;
'Post Title&#60;br /&#62;
Post Body&#60;br /&#62;
Post Excerpt&#60;br /&#62;
Post Category&#60;br /&#62;
Custom Field'&#60;/p&#62;
&#60;p&#62;The &#34;Custom Field&#34; in the Gravity Forms form has been named &#34;File Upload&#34;, file type=&#34;FileUpload&#34;, Custom Field Name=&#34;file_attachment&#34;&#60;/p&#62;
&#60;p&#62;When users complete the form, their information is placed in the Post Drafts, including their PDF file, but when I publish this - everything BUT the Custom Field is displayed.&#60;/p&#62;
&#60;p&#62;I went into the &#34;single.php&#34; file of twenty eleven 1.2 and added this piece of code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
&#38;lt;p&#38;gt;&#38;lt;?php $customfield = get_post_custom_values(&#38;quot;file_attachment&#38;quot;);
if (isset($customField[0])) {
echo &#38;#39;&#38;lt;h3&#38;gt;&#38;lt;a href=&#38;quot;&#38;#39;.$customField[0].&#38;#39;&#38;quot; rel=&#38;quot;nofollow&#38;quot;&#38;gt;Download Now!&#38;lt;/a&#38;gt;&#38;lt;/h3&#38;gt;&#38;#39;;
} ?&#38;gt;&#38;lt;/p&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Nothing (in the Custom Fields) displays...  What am I missing?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
