Title: [Plugin: Custom Field Template] Embedding Flash
Last modified: August 19, 2016

---

# [Plugin: Custom Field Template] Embedding Flash

 *  [Robert](https://wordpress.org/support/users/robertjakobson/)
 * (@robertjakobson)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-embedding-flash/)
 * Can the author or anyone else tell me how to embed Flash .flv files into a custom
   field template?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [Robert](https://wordpress.org/support/users/robertjakobson/)
 * (@robertjakobson)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-embedding-flash/#post-1621785)
 * What I need is, for example, to get the Viper´s Video Quicktags working inside
   the Custom Field Template
 *  Thread Starter [Robert](https://wordpress.org/support/users/robertjakobson/)
 * (@robertjakobson)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-embedding-flash/#post-1621801)
 * or any other video embedding plugin.
 *  [leup](https://wordpress.org/support/users/leup/)
 * (@leup)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-embedding-flash/#post-1622016)
 * Hi,
 * What i did to embed flash files (swf, not flv) but i think you could do the same
   with another plugin for FLV.
 * i use [SWFObj](http://wordpress.org/extend/plugins/swfobj/) plugin to embed flash
   objects in my posts.
 * I have a custom post type named ‘produit’. I made a custom template for it with
   the following field to upload file :
 *     ```
       [VCarrousel]
       type = file
       mediaPicker = true
       mediaLibrary = true
       alias = Visuel carrousel
       ```
   
 * I create a single-produit.php to display my ‘produit’ posts where i wrote in 
   these lines :
 *     ```
       <?php
   
       //give me the attachement id
       $idvc = do_shortcode('[cft key=VCarrousel]');
   
       //if it's an image, display it in 160x160
       if (wp_attachment_is_image($idvc)) {
         echo wp_get_attachment_image($idvc , 'attachment-160x160' ) ;
       }
       else {
         //check if it's a flash file from the mime type
         if (preg_match('@(shockwave|flash)@i',get_post_mime_type($idvc))) {
           echo do_shortcode('[swfobj src="'. wp_get_attachment_url($idvc) . '" dynamic_embed="true" play="false"]');
         }
       }
       ?>
       ```
   
 * I think you could use the [Flash Video Player plugin](http://wordpress.org/extend/plugins/flash-video-player/)
   instead of SWFObj and modify the above code to match the fvp shortcode.
 * Good luck !
 *  Thread Starter [Robert](https://wordpress.org/support/users/robertjakobson/)
 * (@robertjakobson)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-embedding-flash/#post-1622017)
 * Yes, thank You for the answer.
 * I decided to go a different way, but I hazard to quess that many people will 
   find Your answer useful in the future!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Custom Field Template] Embedding Flash’ is closed to new replies.

## Tags

 * [flash](https://wordpress.org/support/topic-tag/flash/)

 * 4 replies
 * 2 participants
 * Last reply from: [Robert](https://wordpress.org/support/users/robertjakobson/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-embedding-flash/#post-1622017)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
