• Resolved beradmin

    (@beradmin)


    Hi there,

    It took me a while to find this very useful information so I am publishing it to help others.

    How to use SFW files in Custom Fields. Here it is the code:

    <?php $video = get_post_meta($post->ID, ‘video’, true); ?>
    <?php if (!empty($video)) {;?>
    <object type=”application/x-shockwave-flash” data=”<?php echo $video; ?>” width=”400″ height=”300″>
    <param name=”movie” value=”<?php echo $video; ?>” />
    </object>
    <?php }; ?>

    It is from http://syndeolabs.com/entries/presenting-videos-using-wordpress. There is more information and explanations there.

    Good luck! 🙂

The topic ‘Code to get SFW file from Custom Fields’ is closed to new replies.