PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

mp4 upload

  1. cinisli
    Member

    hello,

    i want my users to upload mp4 and post them. by adding file upload form, i can upload the file but the content is not visible. my theme has shortcode to watch mp4 files.
    [media url="http://...../videoname.mp4" width="640" height="360"]

    i see the upload folders are different between images and videos. so do i have to change the upload folder for the videos? and how?

    thanks a lot

    Posted 12 years ago on Saturday June 9, 2012 | Permalink
  2. David Peralty

    Your file upload, is it tied to a WordPress custom field? If not, create a custom field and then set it as an upload field. This will make it so you can add or use the file for front-end display in an easy way. Gravity Forms uploads everything to one folder.

    Posted 12 years ago on Monday June 11, 2012 | Permalink
  3. cinisli
    Member

    thank you for your reply. i am not good at coding, how can i create a custom field and set it as an upload field? Thank you for your understanding

    Posted 12 years ago on Monday June 11, 2012 | Permalink
  4. David Peralty

    In Gravity Forms, select Custom Field, and then in the options for that field look for Field Type and select File Upload. Then make sure you select New for custom field, and give it a name (Maybe movie) and then in allowed file types, make sure you add mov. Lastly, you'll want to get the custom field to display on your theme. This is different for every theme.

    http://codex.wordpress.org/Custom_Fields
    http://perishablepress.com/wordpress-custom-fields-tutorial/

    Hope this helps.

    Posted 12 years ago on Monday June 11, 2012 | Permalink
  5. cinisli
    Member

    David thank you very much for your help...

    Posted 12 years ago on Monday June 11, 2012 | Permalink
  6. cinisli
    Member

    Hello David, me again,

    i have a problem i hope you help me to solve. i did everything you said at GF. select New for custom field, and give it a name music and then in allowed file types add mp3. then I created the code;

    <?php get_post_meta($post->ID, 'music', true); ?>
    <?php echo get_post_meta($post->ID, 'music', true); ?>

    Pase At the bottom functions.php .Also i tried loop.php. Still The mp3 is not showing in the post. am i doing something wrong?

    Thanks

    Posted 12 years ago on Tuesday June 12, 2012 | Permalink
  7. David Peralty

    The code to display the custom fields will go into your theme. Most likely in single.php and/or index.php but this depends on your theme. If you need a better understanding of where this should go, you might want to contact the theme author. Also, let me know which theme you are using, and maybe I can help as well.

    Posted 12 years ago on Tuesday June 12, 2012 | Permalink
  8. cinisli
    Member

    hello david,

    i am using the theme called "the blog"

    http://themeforest.net/item/the-blog-wordpress-theme/1520543

    my blog is: http://www.1907.net

    i also tried to take help from my themes help but they are not cleaver i think, they didint understand my problem.

    http://forum.mnkystudio.com/discussion/1534/custom-field#Item_6
    thanks

    Posted 12 years ago on Wednesday June 13, 2012 | Permalink
  9. cinisli
    Member

    i put the code in single php.

    <?php if (get_post_meta($post->ID, 'header_choice_select', true));{ get_header(get_post_meta($post->ID, 'header_choice_select', true)); } ?>
    
    <div id="container_bg">
    <?php if (get_option_tree('post_layout_sidebar', '')) { echo '<div id="content_full" >'; } else {echo '<div id="content" class="left">';} ?> 
    
    <?php get_post_meta($post->ID, 'ses', true); ?>
    <?php echo get_post_meta($post->ID, 'ses', true); ?>
    
    <?php
    $header = get_post_meta($post->ID, 'header_choice_select', true);
    if ($header=='post-slider' || $header =='orbit-slider' || $header=='offer-slider' || $header=='custom-element' || $header=='custom-element-bg'){ ?>
    
    <h1 class="entry-title"><?php the_title(); ?></h1>
    <?php } ?>
    
    <?php get_template_part( 'loop', 'single' ); ?>
    
    </div><!-- #content -->
    <?php if (get_option_tree('post_layout_sidebar', '')) {} else {echo '<div id="sidebar_right">', get_sidebar() . '</div>';}?>
    
    <div class="clear"></div>
    </div><!-- #container -->
    <?php get_footer(); ?>

    but now the code is stands top of the page.

    http://www.1907.net/ses-2/

    when i put the code litte down. the link is not visible. and last question. i can only see the link as a text. how am i going see it as a player?

    Posted 12 years ago on Wednesday June 13, 2012 | Permalink
  10. David Peralty

    To see it as a player, you'll have to look at code examples of embedding media. There are plenty of them out there. Or find a media player plugin for WordPress and find a way for it to pick up your custom field value for the player.

    I was hoping you were using a free theme. Since you are using a paid theme, I'm unable to create a test environment to help you with placement, but it does look like you've partially figured that out. Your code to pull the mp3 link should go in your loop.php file. It might have to go in various spots as no doubt the developer put a giant if statement to check to see if it is the index page or the single post or single page.

    You can ask your theme developer where in their loop.php you should put code to display your custom field values, and he/she should hopefully understand that.

    Posted 12 years ago on Wednesday June 13, 2012 | Permalink