WordPress Video Tube Plugin is a Video Hosting Plugin used to add videos from any site quickly and easily and helps you create your own video tube or video gallery site.
The plugin was build by us because there were no free plugins to help you build a video gallery and the ones which were free just didn’t cut it.
At WPOven we already have compatible premium video themes ready to be installed in your site with just a few clicks (No coding knowledge or editing needed).
But if you are comfortable with a little editing and prefer to do it yourself, you can follow the tutorial below and make your theme compatible with wpbase-video or you can try our very own theme BA-Tube theme for free, which is already 100% compatible with WordPress Video Tube Plugin.
You can easily make any video theme compatible with wpbase-video using the following simple steps:
Before beginning copy the following files from the wpbase-video plugin folder (i.e /wp-content/plugins/wpbase-video) to your theme folder (i.e /wp-content/themes/your-theme-name) :
- /wp-content/plugins/wpbase-video/css/videocss.css
- /wp-content/plugins/wpbase-video/images/timebg.png
To add ratings to your videos, we recommend you use WP-PostRatings plugin.
Making the homepage compatible :
1. Replace the thumbnail-code on the front page (usually “index.php” in your theme folder) with :
1 2 3 4 5 6 7 8 9 |
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php if(has_post_thumbnail()){?> <?php the_post_thumbnail('entry-thumb', array('class' => 'entry-thumb')); ?> <?php } else { ?> <?php $img_url = get_post_meta(get_the_ID(), 'video-thumb', TRUE); ?> <?php if($img_url != null) { ?><img width="320" height="240" src="<?php echo $img_url; ?>" alt="<?php the_title(); ?>" class="entry-thumb"/><?php } ?> <?php } ?> </a> |
2. Add Time to the thumbnails :
Copy the following code, in continuation, where the thumbnail code ends :
1 2 3 4 5 6 7 8 9 |
<?php if (get_post_meta(get_the_ID(), 'video-time', true)) { ?> <small class="time"> <?php if ((get_post_meta(get_the_ID(), 'video-time', true)) > 3599) { echo gmdate("H:i:s", get_post_meta(get_the_ID(), 'video-time', true)); } else { echo gmdate("i:s", get_post_meta(get_the_ID(), 'video-time', true)); } ?> </small> <?php } ?> |
3. If you want to add video views to the homepage :
add the following code in the index.php file :
1 |
<div class="entry-meta"> <span class="entry-comment"> Views : <?php do_action('dispview'); ?> </span> </div><!-- .entry-meta --> |
4. Add Rating for videos (works with WP-PostRatings plugin) :
1 2 3 |
<?php if (function_exists('the_ratings')) { the_ratings(); } ?> |
Making the SINGLE POST PAGE or Viewing single Video page (usually it is single.php) compatible :
1. Add Video (Embed code) :
1 2 3 4 5 6 7 8 9 10 11 12 |
<?php $embed = get_post_meta(get_the_ID(), 'video-code', TRUE); if ($embed) { ?> <div class="entry-embed"> <?php //echo wp_oembed_get( $embed, array( 'width' => 400 ) ); echo stripslashes(htmlspecialchars_decode($embed)); ?> </div><!-- .entry-embed --> <?php } ?> |
2. Add views, time and ratings for video
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<span class="entry-comment"> Views : <?php //echo do_shortcode('[post_view]'); do_action('custhook'); ?> </span> <span class="entry-comment" style="padding-right:10px"> Length : <?php if ((get_post_meta($post->ID, 'video-time', true)) >= 3600) { echo gmdate("H:i:s", get_post_meta($post->ID, 'video-time', true)); } else { echo gmdate("i:s", get_post_meta($post->ID, 'video-time', true)); } ?> </span> <?php if (function_exists('the_ratings')) { the_ratings(); } ?> |
3. Truncate description of Video (i.e ‘view more’ or ‘view less’ options):
1 2 3 4 5 6 7 8 9 10 |
<?php $permalink = ' <a class="desc-a-vid">Read More…</a>'; $truncateContent = truncate::doTruncate(strip_tags(get_the_content(), ""), 300, '.', $permalink); ?> <div class="desc-p-vid"> <?php echo $truncateContent; ?> </div> <div class="desc-p-cont" style="display: none"> <?php the_content(); ?> <a class="hide-vid">Read Less</a> </div> |
and add this in functions.php file in theme folder:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
class truncate { public static function doTruncate($truncateString, $limit, $break = ".", $pad = "…") { // return with no change if string is shorter than $limit if (strlen($truncateString) <= $limit) return $truncateString; // is $break present between $limit and the end of the string? if (false !== ($breakpoint = strpos($truncateString, $break, $limit))) { if ($breakpoint < (strlen($truncateString)) - 1) { $truncateString = substr($truncateString, 0, $breakpoint) . $pad; } } return $truncateString; } } |
and add the following javascript :
1 2 3 4 5 6 7 8 9 10 |
jQuery(".desc-a-vid").click(function(){ jQuery(".desc-p-vid").hide(); jQuery(".desc-p-cont").show(700); jQuery(".desc-a-vid").hide(); }); jQuery(".hide-vid").click(function(){ jQuery(".desc-p-cont").hide(); jQuery(".desc-p-vid").show(); jQuery(".desc-a-vid").show(); }); |
Everything done but don’t see the things at the right place or right size ?
Open the videocss.css file and adjust the values of the lines with comment “//adjust this acc to theme“.
Still can’t get it to work for you ?
We give free support to WPOven users, just drop us a ticket and we will be happy to help.
I am a Co-Founder at WPOven INC currently living in Vancouver, Canada. My interests range from Web Development to Product development and Client projects. I am also interested in web development, WordPress, and entrepreneurship.
I’ve built my website using the Catalyst framework, so the files look a little different. The only line of code in single.php is this:
catalyst_framework();
I tried inserting the code to add the videos to pages, but it didn’t work. Any suggestions on how to get your plugin compatible with the Catalyst framework? Many thanks.
Hi
You will need to find the catalyst_framework() function and make the appropriate changes in it, which you would have made in single.php.
video is not being submitted with title and other details …… I have copied the css and png files in theme folder and replaced the codes in index.php to make compatible …. its twenty ten theme
Hello
Please make sure that the css file in included in the header and could you send a URL to your site so that we can have a closer look.
Thanks
sent u through contact form
its working ok with bablacktube …. what exactly line should I add to include videocss.css in header …..
header ?>
<link rel="stylesheet" type="text/css" media="screen" href="” />
<link rel="pingback" href="” />
<?php ….. kindly suggest any change in videocss.css file
The menu for video bug …. all video go in all categories ..
Hello, the instructions above outline how to achieve a SINGLE VIDEO display, but on your wordpress plugin page, screenshot 4 shows a video, with description to the right, and a related video slider below. Do you have any guide on how to achieve that layout?
Thanks in advance. Very interested in this plugin, just hoping to get it working with our site.
Hi
That screenshot was taken of another theme.
You can find more video compatible themes for this plugin by signing up at WPOven and using the free site creator.
Each theme has a different layout.
Hope it helps.
Thanks
Hi,
I really like your video plugin, is it possible to modify standard themes like the official twentyseries from WordPress to make them fully compatible?
I’ve been experimenting with a child theme but it only shows one video.
I think it would be a good idea the add a child theme to your collection, your themes are great but some plugins break the layout.
Hello
We are glad you like the plugin. You can follow our tutorial to make any WordPress theme compatible with our plugin. https://www.wpoven.com/blog/how-to-make-your-theme-compatible-with-wpbase-video-plugin/
Thank you for your suggestion, we will work on the themes breaking issue.
Can you tell us which plugins are breaking the themes ?
Regards
The plugin is for adult sites I don’t know if you are OK posting it here.
Using it with the BA-Tube theme makes the footer go crazy.
plz post video tutorial plz plz plz it’s very difficult specially for me so plz post VIDEO tutorial
thnx admin