Skip to content

Ronak3899/use-video-as-featured-video-for-any-post-type-wordpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Using Video as Featured Video for Any Post Type in WordPress

Overview

This code snippet allows you to set a video as the featured video for any post type in WordPress. By default, WordPress allows you to set a featured image for posts, but with this code, you can extend this functionality to include videos.

Installation

  1. Copy the code snippet provided in this README.

  2. Navigate to your WordPress admin panel. Go to Appearance > Theme Editor.

  3. In the Theme Files section, locate and click on the "functions.php" file.

  4. Paste the copied code snippet at the end of the functions.php file.

  5. Save the changes.

Usage

After adding the code snippet to your theme's functions.php file, follow these steps to set a video as the featured video for a post:

  1. Create or edit a post of any post type (e.g., post, page, custom post type).

  2. Scroll down to the featured video meta box below the content editor.

  3. Click on the "Set featured video" button.

  4. A modal will appear where you can insert the URL of the video you want to set as the featured video.

  5. Paste the URL of the video (YouTube, Vimeo, or any supported video platform) and click "Set as featured video."

  6. Save or update the post.

Features

Supports videos from YouTube, Vimeo, and other supported video platforms.

Works with any post type, including custom post types.

Provides a user-friendly interface for setting featured videos.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages