Lightning Rank - Private Blog Network

  • Home
  • Done 4 You PBN Service
  • Other Services
    • Amazon Associate Audit
    • Editorial Links
    • Buy Expired Domains
  • Contact
    • Affiliates

How To Embed WordPress TV Videos On WordPress Via Shortcode

November 17, 2015 By Jon Gillham Leave a Comment

This tutorial will show you how to easily embed WordPress.tv videos into your standalone WordPress installation using the WordPress.com shortcode format usually only available to WordPress.com site owners.

To achieve this we will be creating a shortcode and function that will allow us to copy the WordPress.tv video shortcode designed for WordPress.com rather than the HTML embed code that standalone WordPress users usually use.

Firstly we will want get the shortcode for a video on WordPress.tv to place in your WordPress post content. Below is an example of the shortcode from WordPress.tv taken from the video Matt Mullenweg: State of the Word 2012.

wordpress-tv-shortcode-video-embedWhen you paste this shortcode into a standalone installation of WordPress is simply shows the shortcode as text and displays no video like the screenshot below.

wordpress-tv-shortcode-video-embed-before-functionTo get WordPress.tv videos to show in your standalone WordPress installation you will have to copy our shortcode function below into your current WordPress themes functions.php file.

add_shortcode( 'wpvideo', 'wpshock_wptv_video_embed' );
function wpshock_wptv_video_embed( $atts ) {

	return '<object width="600" height="336" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://s0.videopress.com/player.swf?v=1.03" /><param name="wmode" value="direct" /><param name="seamlesstabbing" value="true" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="overstretch" value="true" /><param name="flashvars" value="guid=' . esc_attr( $atts[0] ) .'&isDynamicSeeking=true" /><embed width="600" height="336" type="application/x-shockwave-flash" src="http://s0.videopress.com/player.swf?v=1.03" wmode="direct" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=' . esc_attr( $atts[0] ) .'&isDynamicSeeking=true" /></object>';
}

Now when you paste the WordPress.tv video shortcode intended for WordPress.com blogs into your standalone WordPress install post content it will automatically embed the WordPress.tv video into your post.

wordpress-tv-shortcode-video-embed-after-functionThis is a much cleaner and manageable approach to embedding WordPress.tv videos in your standalone WordPress installation. As always please leave a comment if you have a question or improvements.

Filed Under: Blog Tagged With: add_shortcode, wordpress function, wordpress shortcode, wordpress.tv

Leave a Reply Cancel reply

You must be logged in to post a comment.

Recent Posts

  • What It takes to get to #1 in Google
  • Private Blog Network Building Service in 2016 – Is It Still Worth The Risk?
  • UpThemes Scale Back On Theme Options Within Their WordPress Themes
  • Create A WordPress Login Form Shortcode For Your Blog
  • WooThemes Back Online After Malicious Hack & Further DDoS Attack

Our Team

Jon Gillham

Father, Husband and mechanical engineer. Jon has the easy job he builds and tests systems that Kelley, Hmd and their teams execute!
Ahmed Ali

Ahmed is the man that makes sure everything runs smoothly. A true jack of all trades he makes sure each site is built to our high standards!

Copyright © 2022 . Experts at Harnessing the Power of Expired Domains to Help You Outrank Your Competition