Skip to end of metadata
Go to start of metadata

 The WSU Toolbox Video module activates a shortcode that can be used to embed videos onto WordPress posts & pages.

Shortcode | wsuwp_video

Examples

[wsuwp_video youtube_id="uExQaVUkkng"]
[wsuwp_video youtube_id="uExQaVUkkng" width="500px"]
[wsuwp_video youtube_id="uExQaVUkkng" width="100%" ratio="75%"]
[wsuwp_video youtube_id="uExQaVUkkng" width="300px" classes="class-1 class-2" wrap-text-right="1"]


Attributes

The shortcode supports the following attributes:

  1. type (required) - The type attribute tells the shortcode what type of video is being included. (Default = youtube).
    1. Supported Values:
      1. youtube
      2. vimeo (in progress)

  2. display - The display attribute tells the code how to display the video on the page (Default = player).

    1. Supported Values
      1. player - Currently player is the only supported value.
  3. title (required) - The title attribute fills fills in the title html attribute in the video embed (Default = empty "").

    1. Supported Values:
      1. Titles should be short text that accurately describes the video.

  4. youtube_id - The youtube_id attribute provides the ID to the embed for the video (Default = empty "").

    1. Supported Values: 
      1. YouTube | The YouTube ID is a text string usually located at the end of the url.
        youtu.be/uExQaVUkkng
        youtube.com/watch?v=uExQaVUkkng

  5. vimeo_id - The vimeo_id attribute (Default = empty ""),

  6. classes - The classes attribute allows you to add additional classes to the video wrapper (Default = empty "").

    1. Supported Values:
      1. List of classes separated by a space. Example "class1 class2 class3".
  7. autoplay - The autoplay attribute allows you to specify if you want the video to autoplay or not (Default = empty "").

    1. Supported Values:
      1. 0 or "" - Do not autoplay.
      2. 1 - Auto play video.
  8. width - The width attribute allows you to set the display width of the video (Default = 100%),

    1. Supported Values:
      1. Any recognized CSS width can be used. Value must include the units (100px, 50%, etc...). 
  9. height - The height attribute allows you to set the display height of the video (Default = auto).

    1. Supported Values:
      1. Any recognized CSS height can be used. Value must include the units (100px, 50%, etc...).
      2. auto (recommended) - Automatically adjust the height to maintain video ratio. 
  10. ratio - The ratio attribute sets the display ratio of the video. ***Note: if the video ratio is different than the display ratio, YouTube will add black space on the sides of the video to fill the space (Default = 56.25%).

    1. Supported Values:
      1. Any percentage for the ratio. 16x9 = 56.25%,  4x3 = 75%.
  11. wrap-text-left - The wrap-text-left attribute adds a float:right to the video wrapper causing text to wrap to the left of the video. (Default = 0).

    1. Supported Values:
      1. 0 or "" - Do not wrap text to the left of the video.
      2. 1 - Wrap text to the left.
  12. wrap-text-right - The wrap-text-right attribute adds a float:left to the video wrapper causing text to wrap to the right of the video. (Default =  0).

    1. Supported Values:
      1. 0 or "" - Do not wrap text to the right of the video.
      2. 1 - Wrap text to the right.

  • No labels