<?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: Custom post types on WP 3.0 - Image upload woes</title>
		<link>https://legacy.forums.gravityhelp.com/topic/custom-post-types-on-wp-30-image-upload-woes</link>
		<description>Gravity Support Forums Topic: Custom post types on WP 3.0 - Image upload woes</description>
		<language>en-US</language>
		<pubDate>Thu, 09 Apr 2026 20:48:30 +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/custom-post-types-on-wp-30-image-upload-woes" rel="self" type="application/rss+xml" />

		<item>
			<title>Kevin Flahaut on "Custom post types on WP 3.0 - Image upload woes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-post-types-on-wp-30-image-upload-woes#post-7320</link>
			<pubDate>Mon, 12 Jul 2010 15:46:40 +0000</pubDate>
			<dc:creator>Kevin Flahaut</dc:creator>
			<guid isPermaLink="false">7320@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;What the heck. That's Crazy!! I'm really not that interested, I'm just testing something so just ignore what I'm saying here.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Custom post types on WP 3.0 - Image upload woes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-post-types-on-wp-30-image-upload-woes#post-7316</link>
			<pubDate>Mon, 12 Jul 2010 15:25:34 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">7316@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;test
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Custom post types on WP 3.0 - Image upload woes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-post-types-on-wp-30-image-upload-woes#post-7315</link>
			<pubDate>Mon, 12 Jul 2010 15:24:59 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">7315@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It is strange. I am glad it worked with the new form
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Danny on "Custom post types on WP 3.0 - Image upload woes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-post-types-on-wp-30-image-upload-woes#post-6859</link>
			<pubDate>Wed, 30 Jun 2010 17:25:11 +0000</pubDate>
			<dc:creator>Danny</dc:creator>
			<guid isPermaLink="false">6859@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I created a form from scratch as you suggested with just the title and the image and it worked. Then I added all the other fields exactly like in the other form and everything works properly.&#60;/p&#62;
&#60;p&#62;Then I tried the old one again and that one still doesn't work. Tried the new one and it works just fine.&#60;/p&#62;
&#60;p&#62;Weird stuff. Guess I'll just re-do all the forms from scratch.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Custom post types on WP 3.0 - Image upload woes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-post-types-on-wp-30-image-upload-woes#post-6853</link>
			<pubDate>Wed, 30 Jun 2010 12:24:40 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">6853@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Danny,&#60;br /&#62;
I used your custom post type code and the Gravity Forms hook code above and the post image is making into the gallery Ok. I am not sure what could be causing this issue on your end, but you may want to try to create a new form with just a post title and a post image field to make sure it is not a conflict between fields in your form.&#60;br /&#62;
Let me know how that goes.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Danny on "Custom post types on WP 3.0 - Image upload woes"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-post-types-on-wp-30-image-upload-woes#post-6832</link>
			<pubDate>Tue, 29 Jun 2010 18:46:49 +0000</pubDate>
			<dc:creator>Danny</dc:creator>
			<guid isPermaLink="false">6832@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I want to add posts to a custom post type via GravityForms. I have successfully set this up in GravityForms and when the form is submitted the correct post type is set to the post and even a custom taxonomy is set.&#60;/p&#62;
&#60;p&#62;However the image upload doesn't seem to work. No images show up in the post / WordPress Media Library. The images do show up when viewing entries in the GravityForms interface.&#60;/p&#62;
&#60;p&#62;Any ideas what may be causing this? It works just fine when it's just a default post that gets added instead of setting a custom post type. Here's the code that creates the post type:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// Photos post type
	register_post_type( &#38;#39;sp_photos&#38;#39;,
		array(
			&#38;#39;labels&#38;#39; =&#38;gt; array(
				&#38;#39;name&#38;#39; =&#38;gt; __( &#38;#39;Photos&#38;#39; ),
				&#38;#39;singular_name&#38;#39; =&#38;gt; __( &#38;#39;Photo&#38;#39; ),
				&#38;#39;add_new&#38;#39; =&#38;gt; __( &#38;#39;Add New&#38;#39; ),
				&#38;#39;add_new_item&#38;#39; =&#38;gt; __( &#38;#39;Add New Photo&#38;#39; ),
				&#38;#39;edit&#38;#39; =&#38;gt; __( &#38;#39;Edit&#38;#39; ),
				&#38;#39;edit_item&#38;#39; =&#38;gt; __( &#38;#39;Edit Photo&#38;#39; ),
				&#38;#39;new_item&#38;#39; =&#38;gt; __( &#38;#39;New Photo&#38;#39; ),
				&#38;#39;view&#38;#39; =&#38;gt; __( &#38;#39;View&#38;#39; ),
				&#38;#39;view_item&#38;#39; =&#38;gt; __( &#38;#39;View Photo&#38;#39; ),
				&#38;#39;search_items&#38;#39; =&#38;gt; __( &#38;#39;Search Photos&#38;#39; ),
				&#38;#39;not_found&#38;#39; =&#38;gt; __( &#38;#39;No photos found&#38;#39; ),
				&#38;#39;not_found_in_trash&#38;#39; =&#38;gt; __( &#38;#39;No photos found in Trash&#38;#39; ),
			),
			&#38;#39;public&#38;#39; =&#38;gt; true,
			&#38;#39;show_ui&#38;#39; =&#38;gt; true,
			&#38;#39;publicly_queryable&#38;#39; =&#38;gt; true,
			&#38;#39;exclude_from_search&#38;#39; =&#38;gt; true,
			&#38;#39;hierarchical&#38;#39; =&#38;gt; false,
			&#38;#39;supports&#38;#39; =&#38;gt; array( &#38;#39;title&#38;#39;, &#38;#39;editor&#38;#39;, &#38;#39;custom-fields&#38;#39;, &#38;#39;thumbnail&#38;#39; ),
			&#38;#39;rewrite&#38;#39; =&#38;gt; array( &#38;#39;slug&#38;#39; =&#38;gt; &#38;#39;photos&#38;#39;, &#38;#39;with_front&#38;#39; =&#38;gt; false ),
			&#38;#39;can_export&#38;#39; =&#38;gt; true,
		)
	);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And what changes the post type in the form in GravityForms:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;/**
 * Sets our custom post types and taxonomies
 */

function sp_gravity( $post_data, $form ) {
	if( $form[&#38;quot;id&#38;quot;] == &#38;#39;5&#38;#39; ) {
		// Set our custom post type
		$post_data[&#38;quot;post_type&#38;quot;] = &#38;quot;sp_photos&#38;quot;;
	}
	return $post_data;
}

add_filter( &#38;#39;gform_post_data&#38;#39;, &#38;#39;sp_gravity&#38;#39;, 10, 2 );&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
