Twitch TV Embed Suite

Posted on June 29, 2013

This is a plugin I wrote to embed a Twitch TV stream and chat in a WordPress site. The plugin contains shortcodes, a widget, and an easily configurable settings section to display the stream and/or chat. See the demo.

codecanyon-preview
Download now.

Help

The plugin contains a series of shortcodes to allow you to embed a Twitch TV Live Stream, Chat, and past stream list feed to your page.

Streamlist

This shortcode outputs a series of thumbnails taken directly from the specified Twitch TV stream list and displays them in order from newest to oldest. While it does not play the video on screen,
it links to the video at Twitch.

  • To add a Twitch TV stream list to your posts, pages, or widgets use the following shortcode:
    [plumwd_twitch_streamlist channel="twitchusername"]
  • To add the Twitch TV stream plugin to your WordPress theme use the following shortcode inside your template:
    echo do_shortcode('[plumwd_twitch_streamlist channel="twitchusername"]');

The plugin also supports several attributes for the shortcode, below is a listing of the attributes and what their purpose is:

  1. channel -> this must be set or the feed will not display. Usage:
    [plumwd_twitch_streamlist channel="plumwd"]
  2. videonum -> The number of streams to display. Will return the most recent streams in order from newest to oldest. Usage:
    [[plumwd_twitch_display channel="plumwd" videonum="4"]]
  3. display -> accepts two different options: horizontal or vertical. Usage:
    [plumwd_twitch_streamlist channel="plumwd" display="horizonal"]

Twitch Stream

This shortcode embeds the Twitch TV live stream player.

  • To add a Twitch TV live stream player to your posts, pages, or widgets use the following shortcode:
    [plumwd_twitch_stream channel="twitchusername"]
  • This shortcode takes no attributes and can be inserted using the button screenshot-4 located in WordPress WYSIWYG editor, or by inserting the shortcode to your theme or php enabled widget:echo do_shortcode('[plumwd_twitch_stream channel="twitchusername"]');
  • Shortcode options are:

    channel – twitch channel name
    width – width in pixels or percent. If using percent must use % sign.
    height – height in pixels or percent. If using percent must use % sign.

Twitch Chat

This shortcode embeds the Twitch TV live stream chat box.

  • To add a Twitch TV live stream box to your posts, pages, or widgets use the following shortcode:
    [plumwd_twitch_chat channel="twitchusername"]
  • This shortcode takes no attributes and can be inserted using the button screenshot-5 located in WordPress WYSIWYG editor, or by inserting the shortcode to your theme or php enabled widget:echo do_shortcode('[plumwd_twitch_chat channel="twitchusername"]');
  • Shortcode options are:

    channel – twitch channel name
    width – width in pixels or percent. If using percent must use % sign.
    height – height in pixels or percent. If using percent must use % sign.

Twitch TV Widget

This widget is to display the Twitch TV Stream status (offline/online).

The widget includes the option to add a title, and also to display sharing buttons on both Facebook and Twitter. Add a Twitter username to send the tweet via @username.

204 Comments

Add comment