SunriseWeb.ca

  • Websites
    • Recent Projects
    • PEI Web Presence Program
    • WordPress.com
    • Your Custom Website
    • Website Features
    • Website Hosting
    • WordPress Basics
  • Email Marketing
  • Web Development
    • WordPress Plugins
    • Web Applications
    • Google Apps
  • News & Updates
    • Recent Projects
    • Blog
    • Business
    • Web
    • WordPress Plugins
  • Contact – (902) 940-5034
    • Contact
    • About
    • Community
      • Red Island Relay
      • Lobster Carnival
    • Site Map
You are here: Home / Blog / WordPress Plugins / WP YouTube Channel Gallery

WP YouTube Channel Gallery

November 8, 2010 by Brad Trivers

At SunriseWeb.ca we have switched almost exclusively to building websites powered by the WordPress CMS.  With the release of WordPress version 3.0 in early summer 2010 this open source CMS (Content Management System) has the potential to corner the website market – watch out Drupal and Joomla!  One of the big reasons for this is the ability to quickly and easily create plugins to extend WordPress capabilities, and easily install and configure them.

As part of a recent project for one of my clients I needed the ability to display a YouTube channel feed – as new YouTube videos are posted to the client’s channel they wanted them to appear automatically in their website.  It didn’t take me long to find a WordPress plugin that might do the trick – “WP Youtube channel gallery“.  Since I’m writing my own reservation system plugin for another client I decided I would take a peek at the source code for the YouTube channel gallery plugin to see what I could glean from it.

I noticed that a deprecated function was being used to create the widget to display the YouTube videos and decided to replace it.  This opened up some more options:

  • getting rid of the config page for the plugin – just specify the channel name and number of videos to display in the widget
  • add in new options to:
    • specify the size of the video (e.g. the width in pixels and calculate the height based on standard YouTube aspect ratio)
    • indicate if the video title should be displayed (since it overlays the video anyhow once it is played)
  • add in a shortcode with the same options to allow embedding of the YouTube channel anywhere in a site’s pages and posts

I made the changes, sent them to the plugins’ author – Bruno Neves – and after some debugging the changes are live for download by anyone using WordPress.  Special thanks to Bruno for using my changes, giving me credit and being open to collaboration!

Open source software really is amazing.  The phrase “standing on the shoulders of giants” comes to mind.  I can’t wait to write or collaborate on another plugin!  Here are some screenshots of the WP Youtube channel gallery plugin in action:

WP YouTube Channel Gallery - Shortcode Use (5 videos with titles)
WP YouTube Channel Gallery - Sidebar Widget Use

WP YouTube Channel Gallery - Shortcode Use (1 video)

Sample of “3 column” layout using shortcode with custom CSS in theme’s style.css file.
shortcode:
youtubechannel channelname="GoogleDevelopers" numvideos="9" width="175"

added CSS:
.wp_youtube_gallery {
position: relative;
float: left;
padding: 10px;
}

.wp_youtube_gallery h4 {
font-size: 0.5em;
display: none;
}

The YouTube video below is embedded using the JW Player WordPress Plugin to show that there are no compatibility issues between it and the YouTube Channel Gallery plugin.

[jwplayer file=”http://www.youtube.com/watch?v=fLQtssJDMMc” image=”https://sunriseweb.ca/wp-content/uploads/2011/01/nombray-domain-name-gift.jpg”]

  • Tweet
  • More
  • Print

Filed Under: WordPress Plugins Tagged With: collaboration, WordPress, WP Youtube Channel Gallery, YouTube

Subscribe to our mailing list

Get ideas for your web presence, helpful links and tips, and updates about our latest projects.

About Brad

Husband and father of two. PEI MLA for Rustico-Emerald. WordPress Developer. Kitchen party musician. Oldtimer hockey player. Follow me at @bradtrivers or view my personal website BradTrivers.com. Read More…

About Karen

Wife and mother of two. Industrial engineer, P. Eng., Chief Financial Officer, head of quality assurance, web designer. Read More…

Canva – The Online Design Tool Everyone Is Raving About

Design anything in minutes with thousands of beautiful templates and images from Canva.

Try Canva Pro Today

Get online quickly!

WordPress.com The Premium Plan for a website with WordPress.com costs $120/year and includes a domain name. Contact me to get started.

Sell Products and Services Online

We recommend and use WooCommerce for online shops. WooCommerce

Project Categories

  • Genesis Themes
  • Elegant Themes
  • Divi Theme
  • WooCommerce
  • WordPress.com

Copyright © 2021 · Agency Pro Theme on Genesis Framework · WordPress · Log in