WordPress.org

Forums

Frontend Uploader
How to get posts to custom post types. (4 posts)

  1. alextynemouth
    Member
    Posted 1 year ago #

    Hi,

    I am using your plugin for a gaming website.

    I want users to be able to submit articles to the site and i've tried to setup the form to get the articles to post to their respective custom post types (Xbox Article, Playstation Articles, PC Articles, Nintendo Articles, Non-Review Articles). I have selected them in the settings page and this is my current oode;

    [fu-upload-form class="required" title="Submit Article"]

    [input type="text" name="post_title" id="title" class="required" description="Article Title" multiple=""]
    [textarea name="post_content" class="textarea" id="ug_caption" description="Article/Review"]
    [input type="file" name="photo" id="ug_photo" class="required" description="Images for Article (minimum of 1 required)" multiple=""]
    [select name="Platform" name="post_type" class="select" description="Platform" values="Xbox, Playstation, PC, Nintendo, Non-Review"]
    [input type="submit" class="btn" value="Submit"]
    [/fu-upload-form]

    Is there a way i can get the users to select what post type they post to? The post types in the url are coming up as follows respectively;

    Xbox = 'post_type=it_xbox'
    Playstation = 'post_type=it_playstation'
    PC = 'post_type=it_pc'
    Nintendo = 'post_type=it_nintendo'
    Non-Review = 'post_type=it_nonreview'

    I've tried to figure out the 'post_type' shortcode however i'm not getting very far. I'm basically trying to make it so when the user's select Xbox from the dropdown that the article will post to Xbox Articles in the backend of wordpress.

    Thanks for your help in advance.

    https://wordpress.org/plugins/frontend-uploader/

  2. Rinat Khaziev
    Member
    Plugin Author

    Posted 1 year ago #

    The problem you have is that when you add select you need to add post type slug. Also name attribute should only be used once.

    So in your case it should be something like this (the rest of shortcode is omitted):
    [select name="post_type" description="Platform" values="it_xbox: Xbox,it_playstation:Playstation"]

    Let me know if that worked (it might actually not, I did not test it).

  3. alextynemouth
    Member
    Posted 1 year ago #

    Hi Rinat,

    Thanks for the response!

    I tried the above in the shortcode however its still directing all submitted posts to the Media UGC view. My shortcode now looks as below.

    Sorry to be a pain but could you take another look? I just want to know if its actually doable with the plugin cause otherwise ill have to find another solution.

    Thanks for all your help so far.

    [fu-upload-form class="your-class" title="Submit Article"]

    [input type="text" name="post_title" id="title" class="required" description="Article Title" multiple=""]
    [textarea name="post_content" class="textarea" id="ug_caption" description="Article/Review"]
    [input type="file" name="photo" id="ug_photo" class="required" description="Images for Article (minimum of 1 required)" multiple=""][select name="post_type" description="Platform" values="it_xbox: Xbox,it_playstation:Playstation,it_pc:PC,it_nintendo:Nintendo,it_nonreview:Non-Review"]
    [input type="submit" class="btn" value="Submit"]

    [/fu-upload-form]

  4. Neegex.Mayank
    Member
    Posted 1 year ago #

    Hi Rinat,

    i'm using the short-code in my page My Uploads.
    [fu-upload-form title="Upload Your Selfie Here"]
    [input type="text" class="required" name="post_title" description="Give The Title Of Your Selfie"]
    [select name="post_type" class="required" description="Type Of Selfie" values="it_women:Women,it_men:Men,it_sexy:Sexy,it_fitness:Fitness,it_pet:Pet,it_fails:Fails,it_cop:Cop,it_celebrity:Celebrity"]
    [textarea name="post_content" class="required" description="Give The Description Of Your Selfie"][input type="file" class="required" name="photo" description="Upload Your Selfie"][input type="submit" class="btn" value="Submit"][/fu-upload-form]

    the upload is done successfully in UGC media Library.. one thing that is

    [select name="post_type" class="required" description="Type Of Selfie" values="it_women:Women,it_men:Men,it_sexy:Sexy,it_fitness:Fitness,it_pet:Pet,it_fails:Fails,it_cop:Cop,it_celebrity:Celebrity"]

    is not working, I've tried to as i need to my users upload media with my selected categories options in front, and media is uploaded to UGC library at backend in wordpress with checked category.!

    Thanks for your help in advance.

    https://wordpress.org/plugins/frontend-uploader/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Frontend Uploader
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.