Submission doesn’t end up in custom post type
-
Hi, I have created a custom post type for a site called “memory_quilt”. For some reason I can’t figure out how to get the submission to save as this post type. In the wp-admin I find it under “Media” >> “Manage UGC”. How do I get it to save under my custom post type “Memory Quilt” >> “Manage UGC”?
I looked in the database and it looks like it is saving as post_type “attachment”.
Here’s the code I added to my functions.php for my custom post type:
add_action('init', 'custom_post_types'); function custom_post_types(){ register_post_type('memory_quilt', array( 'labels' => array( 'name' => __('Memory Quilt'), ), 'menu_icon' => 'dashicons-heart', 'public' => true, 'has_archive' => true, 'supports' => array('title', 'editor', 'thumbnail', 'custom-fields'), 'exclude_from_search' => true, ) ); }
Here’s the shortcode I created:
[fu-upload-form suppress_default_fields="true" title="Add an image and note about your loved one below. After approval, it will be added to the memory quilt. Thank you." post_type="memory_quilt"] [input type="text" name="dmq_submitter" id="dmq-submitter" class="required" description="Your Name"] [input type="text" name="post_title" id="dmq-email" class="required" description="Your Email Address"] [input type="text" name="dmq_first" id="dmq-first" class="required" description="First Name of Loved One"] [input type="text" name="dmq_note" id="dmq-note" description="Include a note about loved one (optional)"] [input type="file" name="photo" id="dmq-photo-submission" class="required" description="Attach a Photo of your Loved One"] [input type="submit" class="btn" value="Submit"] [recaptcha] [/fu-upload-form]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Submission doesn’t end up in custom post type’ is closed to new replies.