WordPress.org

Ready to get started?Download WordPress

Forums

Frontend Uploader
PHP CODE (5 posts)

  1. pupilo
    Member
    Posted 1 year ago #

    Hello, I was wondering if there is a code to add this aplication to my theme instead of adding it to just a post. Thank you!

    http://wordpress.org/extend/plugins/frontend-uploader/

  2. Rinat Khaziev
    Member
    Plugin Author

    Posted 1 year ago #

    Theoretically, you can add it like this:
    do_shortcode( '[fu-upload-form] but you might need to pass additional parameters to the shortcode

  3. nerdjgua
    Member
    Posted 1 year ago #

    Hi, just my 2 cents:

    Rinat approach is correct. But if you don't want to get any kind of issues, you have to assign a variable with your shortcodes. Example:

    <?php
    $fu = '[fu-upload-form class="validate" form_layout="post_image" post_type="post_image" title=""]'.PHP_EOL;
    $fu .= '[input type="text" name="post_title" id="ug_post_title" class="required" description="Post Title"]'.PHP_EOL;
    $fu .= '[input type="file" name="photo" id="ug_photo" class="required" description=""  multiple="true"]'.PHP_EOL;
    $fu .= '[input type="text" name="name" id="ug_name" description="Customer Name"]'.PHP_EOL;
    $fu .= '[input type="text" name="email" id="ug_email" description="Customer Email"]'.PHP_EOL;
    $fu .= '[input type="submit" class="btn" value="Send Files"]'.PHP_EOL;
    $fu .= '[/fu-upload-form]';
    
    echo do_shortcode($fu);
    ?>

    Cheers,

  4. ZehrGut
    Member
    Posted 1 year ago #

    Hello!

    Thanks a lot for the plugin!

    Is there template tag instead of using do_shortcode ?

    Thanks in advance!

  5. Rinat Khaziev
    Member
    Plugin Author

    Posted 1 year ago #

    Hey!

    You're quite welcome.

    Unfortunately there's no template tag right now, and I can't really promise there'll be one in the near future.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.