<?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: Add image to post using a hook?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/add-image-to-post-using-a-hook</link>
		<description>Gravity Support Forums Topic: Add image to post using a hook?</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 02:35: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/add-image-to-post-using-a-hook" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "Add image to post using a hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-image-to-post-using-a-hook#post-18475</link>
			<pubDate>Mon, 14 Feb 2011 13:22:06 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">18475@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You should be able to add links, etc. to your conte template just like you would add images.  However, as I mentioned in your other post, conditional statements are not possible with the content template.  So it's best to only output fields that are required in the content template.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>lindebjerg on "Add image to post using a hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-image-to-post-using-a-hook#post-18386</link>
			<pubDate>Sat, 12 Feb 2011 09:48:51 +0000</pubDate>
			<dc:creator>lindebjerg</dc:creator>
			<guid isPermaLink="false">18386@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks Carl, I am almost there thanks to your answer on another post of mine.&#60;br /&#62;
I have a intern or private site, where the users must be able to make a post with a thumb, works perfect setting it in the up right corner of the post and used as thumbnail or image picture in my theme (Genesis/Child from StudioPress).&#60;/p&#62;
&#60;p&#62;My last problem, I would like be able to upload more than one file and make a link out of the uploads to put into the body.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Add image to post using a hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-image-to-post-using-a-hook#post-18357</link>
			<pubDate>Fri, 11 Feb 2011 18:18:36 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">18357@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@lindebjerg Please explain what you are trying to do, i'm not quite clear what you are trying to customize or what you are trying to accomplish.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>lindebjerg on "Add image to post using a hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-image-to-post-using-a-hook#post-18356</link>
			<pubDate>Fri, 11 Feb 2011 18:16:58 +0000</pubDate>
			<dc:creator>lindebjerg</dc:creator>
			<guid isPermaLink="false">18356@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I just tried the script from Alex Cancado useing the using the post_submission hook, it is powerfull.&#60;br /&#62;
I made a page put in a form with post a article function, then I put up the script from Alex, made a new post useing the form and then all the  content on that page was away....  only the text ”This is my image” was there.&#60;br /&#62;
I am sure I made a mistake somehow but how... I did not want to post into the page, but make a new post of course. Without the script my form works fine and make a post in the right category.&#60;br /&#62;
I just want to find a way to put a file or a link to that uploaded file or?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>UTH Office of Communications on "Add image to post using a hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-image-to-post-using-a-hook#post-11133</link>
			<pubDate>Wed, 13 Oct 2010 18:08:23 +0000</pubDate>
			<dc:creator>UTH Office of Communications</dc:creator>
			<guid isPermaLink="false">11133@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;WOO-HOO! Works perfectly! Thank you both, Carl &#38;amp; David, for replying.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Add image to post using a hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-image-to-post-using-a-hook#post-11124</link>
			<pubDate>Wed, 13 Oct 2010 15:30:55 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">11124@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Eric, here is a quick snippet that will add the post id to the post title when the form is submitted. It works pretty much exactly like you thought it would. :)&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastie.org/1218925&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/1218925&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;code&#62;add_action(&#38;quot;gform_post_submission_14&#38;quot;, &#38;quot;update_gform_post_title&#38;quot;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Replace the &#34;14&#34; with the ID of your form.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$post-&#38;gt;post_title = $post_id . &#38;#39;: &#38;#39; . $entry[1];&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Replace the &#34;1&#34; in &#34;$entry[1]&#34; with the id of your post title field.&#60;/p&#62;
&#60;p&#62;Hope that helps. :)&#60;/p&#62;
&#60;p&#62;PS - This would go in your functions.php file.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>UTH Office of Communications on "Add image to post using a hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-image-to-post-using-a-hook#post-11106</link>
			<pubDate>Wed, 13 Oct 2010 13:11:32 +0000</pubDate>
			<dc:creator>UTH Office of Communications</dc:creator>
			<guid isPermaLink="false">11106@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I did try that, Carl. If fact, out of 'embeded post id', 'post id', and 'entry id', entry was the only one that worked (by inserting the number).&#60;/p&#62;
&#60;p&#62;I could use entry id, but I really want to have the post id, since it is what is used when using short URLs (via WP Stat's Get ShortURL button). I also wanted to use the post id because it would be easier for the people maintaining the website to search by the post ID when editing content for that specific post.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Add image to post using a hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-image-to-post-using-a-hook#post-11095</link>
			<pubDate>Wed, 13 Oct 2010 11:18:38 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">11095@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Do you have to use the Post ID? Could you use the Entry ID associated with the form submission? Doing so would allow you to to implement this without requiring custom code.  You could use the Post Title Template functionality to append the entry_id to the end of the post title content.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>UTH Office of Communications on "Add image to post using a hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-image-to-post-using-a-hook#post-11081</link>
			<pubDate>Wed, 13 Oct 2010 09:11:17 +0000</pubDate>
			<dc:creator>UTH Office of Communications</dc:creator>
			<guid isPermaLink="false">11081@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm looking to add the Post ID to the Post Title after somebody submits a new entry (via Post Fields). It's for a job board I'm creating, so the post title would be '###: Job Title' and the slug would be URL.com/###-job-title/.&#60;/p&#62;
&#60;p&#62;Using Alex's code above, it seems as though you could modify line #16 to add the Post ID to the newly created post. Anyone have any idea how that would be written?&#60;/p&#62;
&#60;p&#62;Would it be something like this?&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$post-&#38;gt;post_title = $entry[&#38;quot;post_id&#38;quot;] .&#38;quot;: &#38;quot;. $entry[8] ;&#60;/code&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bartv2 on "Add image to post using a hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-image-to-post-using-a-hook#post-3549</link>
			<pubDate>Mon, 22 Feb 2010 16:07:15 +0000</pubDate>
			<dc:creator>bartv2</dc:creator>
			<guid isPermaLink="false">3549@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;*excellent*&#60;/p&#62;
&#60;p&#62;Thanks!&#60;/p&#62;
&#60;p&#62;Bart
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
