Add Featured Video

If you are running a digital market place that sells videos, you might want to provide a video thumbnail instead of the standard featured image for your products. The following article will outline how you can achieve this with the help of a 3rd party plugin and some integration code provided.

Please Note:

Although we provide these tips and tricks, custom code is not covered by support. We provide these without warranty. We do test them as working at the time of publishing. If you do find an error with it, let us know and we will try and resolve it when we can.


  1. WC Vendors Marketplace
  2. WC Vendors Pro
  3. WooCommerce Featured Video (free)


We are going to assume that you have already installed and configured WC Vendors Marketplace and WC Vendors Pro. If you haven’t please see our guides here and here. You will then just need to install WooCommerce Featured Video from the repository.

Go to Plugins > Add New on your WordPress Dashboard and then search for WooCommerce Featured Video. Click on install.  

Then activate 

Integration code

Once the WooCommerce Featured Video plugin is installed and activated all you will need to do is add the following code to your themes functions.php and it will provide a new video URL input box for your products.

if ( class_exists( 'WooCommerce_Featured_Video' ) ) {
	add_action( 'wcv_after_product_media', 'featured_video' );
	function featured_video( $post_id ) {
		$woofv_video_embed = maybe_unserialize( get_post_meta( $post_id, '_woofv_video_embed', true ) );
		$url               = isset( $woofv_video_embed['url'] ) ? $woofv_video_embed['url'] : '';
		$source            = isset( $woofv_video_embed['source'] ) ? $woofv_video_embed['source'] : '';
				'id'          => 'woofv_video_embed_url',
				'name'        => 'woofv_video_embed[url]',
				'label'       => __( 'Featured Video URL', 'wcvendors-pro' ),
				'placeholder' => __( 'Video url', 'wcvendors-pro' ),
				'type'        => 'text',
				'value'       => $url,
				'id'                => 'woofv_video_embed_source',
				'name'              => 'woofv_video_embed',
				'label'             => __( 'Source Type', 'wcvendors-pro' ),
				'options'           => array(
					'local'    => __( 'Local media URL', 'wcvendors-pro' ),
					'external' => __( 'External URL', 'wcvendors-pro' ),
				'value'             => $source,
				'custom_attributes' => array(
					'class' => 'select2',
	add_action( 'wcv_save_product', 'save_featured_video' );
	function save_featured_video( $post_id ) {
		// Sanitize the user input.
		$woofv_data = array_map( 'sanitize_text_field', $_POST['woofv_video_embed'] );
		// Update the meta field.
		update_post_meta( $post_id, '_woofv_video_embed', $woofv_data );

This will result in the following being added to your WC Vendors Pro Product edit form.

Please note. If a video URL is set then the featured image above is ignored. If you wish to have the featured image show again, just delete the featured image URL.

Supported video links are outlined on the plugin page here –


Updated on February 24, 2020

Was this article helpful?