<?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: update_post_meta with Custom post_type</title>
		<link>https://legacy.forums.gravityhelp.com/topic/update_post_meta-with-custom-post_type</link>
		<description>Gravity Support Forums Topic: update_post_meta with Custom post_type</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 03:03:56 +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/update_post_meta-with-custom-post_type" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "update_post_meta with Custom post_type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/update_post_meta-with-custom-post_type#post-65083</link>
			<pubDate>Fri, 06 Jul 2012 16:51:04 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">65083@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Glad you figured that out.  Thanks for the update.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Noel Green on "update_post_meta with Custom post_type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/update_post_meta-with-custom-post_type#post-65079</link>
			<pubDate>Fri, 06 Jul 2012 16:20:02 +0000</pubDate>
			<dc:creator>Noel Green</dc:creator>
			<guid isPermaLink="false">65079@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Got it!!&#60;/p&#62;
&#60;p&#62;All I had to do was change the &#34;$_POST&#34; to &#34;$entry&#34;.&#60;br /&#62;
I don't know why I hadn't noticed that.&#60;/p&#62;
&#60;p&#62;Thanks for the help!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "update_post_meta with Custom post_type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/update_post_meta-with-custom-post_type#post-64934</link>
			<pubDate>Thu, 05 Jul 2012 21:35:30 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">64934@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;&#34;but it simply deleted all the entries&#34;&#60;/p&#62;
&#60;p&#62;That seems sort of scary.&#60;/p&#62;
&#60;p&#62;For troubleshooting, I would start by determining if you can retrieve the post. Can you var_dump the $postID and log it, display it, or email it to yourself?&#60;/p&#62;
&#60;p&#62;Once you know you have the correct post, it's a matter of updating the post_meta, correct?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Noel Green on "update_post_meta with Custom post_type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/update_post_meta-with-custom-post_type#post-64871</link>
			<pubDate>Thu, 05 Jul 2012 12:59:56 +0000</pubDate>
			<dc:creator>Noel Green</dc:creator>
			<guid isPermaLink="false">64871@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Any other thoughts on this?&#60;br /&#62;
I've still had no luck.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Noel Green on "update_post_meta with Custom post_type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/update_post_meta-with-custom-post_type#post-64734</link>
			<pubDate>Wed, 04 Jul 2012 10:42:04 +0000</pubDate>
			<dc:creator>Noel Green</dc:creator>
			<guid isPermaLink="false">64734@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It is grabbing it... but it may not be grabbing it correctly.&#60;/p&#62;
&#60;p&#62;Meaning I can echo it onto the page, but when I added in what you gave it &#34;updated&#34; the post, but it simply deleted all the entries.&#60;/p&#62;
&#60;p&#62;Have a look...&#60;/p&#62;
&#60;p&#62;Here's the template page...&#60;br /&#62;
&#60;a href=&#34;http://pastebin.com/kUHyp19H&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/kUHyp19H&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;And here's the functions page...&#60;br /&#62;
&#60;a href=&#34;http://pastebin.com/3L6TZk2m&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/3L6TZk2m&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "update_post_meta with Custom post_type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/update_post_meta-with-custom-post_type#post-64700</link>
			<pubDate>Wed, 04 Jul 2012 07:34:32 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">64700@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I think the problem is that $postID will not contain the ID of the post.  Should that be &#60;strong&#62;$post-&#38;gt;ID&#60;/strong&#62;?  Otherwise, where does $postID get defined?  Can you echo the value of $postID and see what it contains?&#60;/p&#62;
&#60;p&#62;Also, outside the loop, you sometimes need to use this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;global $wp_query;
$thePostID = $wp_query-&#38;gt;post-&#38;gt;ID;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Noel Green on "update_post_meta with Custom post_type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/update_post_meta-with-custom-post_type#post-64677</link>
			<pubDate>Wed, 04 Jul 2012 01:36:03 +0000</pubDate>
			<dc:creator>Noel Green</dc:creator>
			<guid isPermaLink="false">64677@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have a custom post_type called, &#34;lessons&#34; which has meta fields that I populate with a gravity form.&#60;/p&#62;
&#60;p&#62;I then have a &#34;duplicate&#34; of the form that loads on a separate page and dynamically populates the content with the meta information and is supposed to let people update the post.&#60;/p&#62;
&#60;p&#62;I have a gform_after_submission hook to update the meta data, but because it's a custom post_type it's not working.&#60;/p&#62;
&#60;p&#62;Here's what I have for the function to update the meta...&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function gf_edit_plans( $entry, $form ) {
    global $post;
		$monday_lesson = $_POST[&#38;#39;20&#38;#39;];
		update_post_meta($postID, &#38;#39;monday_lesson&#38;#39;, $monday_lesson );
}
add_action( &#38;#39;gform_after_submission_10&#38;#39;, &#38;#39;gf_edit_plans&#38;#39;, 10, 2 );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Any ideas?&#60;br /&#62;
I've been racking my brain on this one for hours!!&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
