Shortcode

You can display or embed a Doodstream video in a nice and responsive format in your video post using the dynamic shortcode.

WPDoods offers comprehensive shortcode functionality to embed a video iframe wrapped with an image in any post or page. You can find the shortcode inside the video post edit screen. You can also adjust the shortcode dynamically using our Shortcode Generator inside the video post edit screen:

Shortcode Generator WPDoods

The [wpdoods] shortcode supports various functionalities with attributes for id, image, and download, here are all the possible usages with explanations for each:

Basic Usage

Default Usage: No attributes specified, uses the current post’s featured image and video settings.

[wpdoods]

Using the id Attribute

With Post ID: Specify a post ID to target video and image meta information from that specific post.

[wpdoods id="123"]

With Meta Box Value: Use a custom identifier (value stored in the wpdoods_video_info_file_code meta box) to fetch video information.

[wpdoods id="custom_identifier"]

Using the image Attribute

With Featured Image: Display the featured image from the specified post or current post.

[wpdoods image="featured"]

With Splash Image: Display the image from wpdoods_video_info_splash_image meta field.

[wpdoods image="splash"]

With Single Image: Display the image from wpdoods_video_info_single_image meta field.

[wpdoods image="single"]

With Custom Image URL: Directly use a specified image URL for the video background.

[wpdoods image="https://example.com/path/to/image.jpg"]

Using the download Attribute

Enable Download Button: Adds a download button if set to true. The link is fetched from a custom field and opens in a new tab.

[wpdoods download="true"]

Disable Download Button: Explicitly disable the download button.

[wpdoods download="false"]

Combined Attributes

Post ID with Splash Image and Download: Specifies a post ID, uses the splash image, and enables the download button.

[wpdoods id="456" image="splash" download="true"]

Custom Identifier with Single Image and No Download: Uses a custom identifier from a meta box with a specific single image and disables the download button.

[wpdoods id="custom_identifier" image="single" download="false"]

Custom Image URL with Download: Uses a direct image URL and enables a download link.

[wpdoods image="https://example.com/path/to/custom-image.png" download="true"]

Custom Identifier with Custom Image URL: Uses a custom identifier and a direct image URL, useful for entirely customized setups.

[wpdoods id="unique_code" image="https://example.com/path/to/custom-image.png"]

Usage Notes

  • Flexibility: You can mix and match these attributes based on your content requirements. Ensure all related meta fields and options are appropriately set up in WordPress.
  • Customization: This shortcode allows significant flexibility, letting you display videos with different backgrounds and options on posts, pages, or custom post types.

These examples cover a comprehensive range of possibilities for the shortcode, allowing you to dynamically display video content with varying images and optional downloads across your WordPress site.

Was this page helpful?