• Access & Security 95
  • Administration 171
  • Advertisement 92
  • Audio & Video 66
  • Author & Content 99
  • Comments 96
  • Communication 110
  • Communities & Forums 84
  • Development 47
  • E-Commerce 76
  • Email Management 53
  • Events & Calendars 80
  • Language 25
  • Map & Weather 44
  • Migration & Conversion 28
  • Miscellaneous 254
  • Mobile 15
  • Photos 143
  • Plugins 260
  • SEO & Site Speed 118
  • Social 186
  • Theme Enhancement 169

  • Add this plugin to a List

    You need to be logged in to add this plugin to your list.

    Related YouTube Videos

    Add to List

    Related YouTube Videos is a free WordPress plugin that embeds a number of, well, YouTube videos that are related to your content. The list is put together by using the YouTube search API. And you can specify the relation between the videos and your content by:

    • the title of your current post, page or custom post type.
    • the tags of your current post, page or custom post type.
    • the categories of your current post, page or custom post type.
    • any keywords you specify.

    Also, this plugin offers you two ways to embed related videos:

    1. by using the shortcode [relatedYouTubeVideos] somewhere in your post/page content.
    2. by using the WordPress widget “Related YouTube Videos” in any of your widget areas (multiple instances are possible).

    Disclaimer / Important

    As of April 2015 the YouTube API can only be accessed when you have a valid key for the data API. Also, the number of free requests per day is limited!

    There is a nice and short video tutorial ( on how to get such an API key. But it’s up to you to make sure your stay within the free limit or keep track of the costs when you need more than that!

    Please read Youtube and Google’s terms and conditions for more details.

    The Shortcode

    I’m only going to explain the options/paramters for the shortcode but they work exactly the same for the widget, of course.

    You can put the shortcode [relatedYouTubeVideos] anywhere you want inside the content of a page, post, or custom post type – as long as your WordPress theme is supporting shortcodes.

    You can use the following options/parameters/attributes:


    • id – You can specify the HTML id attribute for the wrapping <ul> element.
    • class – You can specify an additional HTML class name for the wrapping <ul> element
    • width – Width of the HTML video object
    • height – Height of the HTML video object
    • preview – “true” will only display the preview image and only load the video (via Javascript!) when this image has been clicked.
    • showVideoTitle – “true” if you want to show the video title right below the video itself. Can be styled via CSS class .title
    • showVideoDescription – “true” if you want to show the video description below the video, respectively, when the video title is displayed right below the title. Can be styled via CSS class .description
    • autoplay – “true” if you want the video to automatically start playing when ready. This will obviously not work in preview mode!!
    • exclude – Comma separated list of post/page IDs where no videos shall be displayed.


    • max – Number of videos (or search results) that will be returned. Can be any number between 1 and 10!
    • random – Select MAX number of videos out of RANDOM number of videos.
    • offset – START and OFFSET are interchangably the same and just other words for the same option.


    • relation – Specify the kind of relation that shall be used for searching YouTube. Can either be ‘postTitle’, ‘postTags’, ‘postCategories’, or ‘keywords’ (in which case the attribute ‘terms’ will be used for the YouTube search).
    • terms – Search YouTube for these terms – no separating commas required.
    • exact – Set to ‘true’ will (try to) search for the exact phrase.
    • orderBy – Can either be ‘published’, ‘rating’, ‘viewCount’, (default) ‘relevance’.
    • lang – {2-letter-language-code} will show videos in that language.
    • region – {2-letter-country-code} will show videos that are actually viewable in that region/country.
    • author – Only show videos from a given YouTube User(name) .
    • filter – Add additional keywords or filtering search parameters. Those will always be added even when the relation is set to post title, tags, or so. You can also manually add post tags by adding ‘+postTags’, categories by adding ‘+postCategories’, the post title by adding ‘+postTitle’, post meta data by adding ‘+postMeta:key’ to the filter.
    • viewRelated – set to “no” or “false” will not show more related videos at the end of a clip.

    I recommend always using the attributes ‘relation’, ‘max’, and if the relation shall be ‘keywords’ the ‘terms’ attribute. Depending on your design you might also set a custom width and height for the videos so they fit in properly.

    Shortcode Example 1: [relatedYouTubeVideos relation=”postTags” max=”3″] Will show three videos coming back from the search YouTube for (all!) the tags you have assigned to this post or page.

    Shortcode Example 2: [relatedYouTubeVideos relation=”keywords” terms=”monty python” max=”5″] Will show five Monty Python videos from YouTube.

    Shortcode Example 3: [relatedYouTubeVideos relation=”keywords” terms=”real madrid” exact=”true” max=”2″] Will search for the exact phrase “Real Madrid” and (hopefully) not just anything “real”.

    Shortcode Example 4: [relatedYouTubeVideos relation=”postTitle” max=”1″ orderBy=”viewCount” start=”1″] Will show the second most popular video (the first being skipped) relating to your post or page title.

    Shortcode Example 5: [relatedYouTubeVideos relation=”keywords” terms=”monthy python” max=”1″ showVideoTitle=”true” showVideoDescription=”true”] Will show a Monty Python video, followed by the video title, followed by the video, followed by the video description.

    Shortcode Example 6: [relatedYouTubeVideos relation=”keywords” terms=”monthy python” max=”1″ preview=”true”] Will show the thumbnail of a Monty Python video and load + play the video only when it’s being clicked.

    Shortcode Example 7: [relatedYouTubeVideos relation=”postTitle” filter=”intitle:official -intitle:cover” max=”1″ preview=”true”] If the post title is about a music video (band and song title, for example) this will only show the official music video.

    Shortcode Example 8: [relatedYouTubeVideos relation=”postTitle” filter=”+postCategories” max=”1″ preview=”true”] Will use the post title and a list of all categories the post is in to search YT.

    The Widget

    The widget almost works the same way. Or at least it has the same options for configuring the video request. If you log into your WordPress backend and go to the “Appearance > Widget” menu (given that your theme supports widgets) you can drag&drop a widget instance into the widget area of your choice.

    The relatedYouTubeVideos widget allows multiple instances. So you can put as many widgets as you like into as many widget areas as you like.

    The difference between the widget and the shortcode is not in terms of functionality but usually in the context they reside. Widgets usually go into sidebars or footers and alike and the same widget usually shows up for many, if not all pages, just the same. Shortcodes are placed inside the actual content and therefore will only show up when the page or post where they’re put is shown.

    There is one functionality that only applies to widgets: In the options field “Hide on” you can set a list of comma separated, numerical post IDs on which the widget will not show up. This way you can easily exlude the widget on certain post. You can also use PAGE ids for that matter, since under the hood WordPress manages all “post type” IDs the same.

    Randomize Results

    The same keywords (or post title/tags) will ususally return the same video(s) for a period of time. Basically, that’s up to YouTube but in can take days, weeks or even months until fresh videos will show up.

    When you set a numeric value for the RANDOM parameter/option you can get random videos from a pool of results. The MAX value plays along with the RANDOM value and both read like this: Show me {MAX} random videos out of {RANDOM} videos.

    [relatedYouTubeVideos relation=”keywords” terms=”fast cars” max=”2″ random=”10″] will actually request 10 videos from YouTube but only show 2 random ones out of that 10.

    So RANDOM will determine the size of the pool MAX videos will be chosen from.

    System Requirements

    In order to run this plugin you need the following components installed and enabled in your server and PHP environment:

    • PHP 5.1.2+
    • SimpleXML (usually is enabled by default anyways)
    • cURL (preferred) or fopen/fsockopen
    • OpenSSL + HTTPS wrapper (is only required if cURL is not available)
    • WordPress 3.0+

    In general you should not have to worry about these things since they’re included in most web hosting packages nowadays.
    But to be sure you can download and install this plugin and then check the backend page. There is a “System Requirements” section that will show you exactly if you can good to go or if there is any problem.

    In case you’re getting a “URL file-access is disabled in the server configuration” error you should make sure your PHP.ini file contains these two lines:

    allow_url_include = on

    allow_url_fopen = on

    Available Languages:

    • English
    • German
    • Serbo-Croatian – by Borisa Djuraskovic (Webhostinghub)
      Developers can also use the API class outside the plugin context, for example in a theme template file. All you have to do is include the class (if it doesn’t already exist) and create an object like this:

      /* Load the “Related YouTube Videos” API class if it does not exist yet. */
      if( !class_exists( ‘RelatedYouTubeVideos_API’ ) ) {

      $file = str_replace( ‘/’, DIRECTORY_SEPARATOR, ABSPATH ) . ‘lib’ . DIRECTORY_SEPARATOR . ‘RelatedYouTubeVidoes’ . DIRECTORY_SEPARATOR . ‘API.php’;

      if( file_exists( $file ) ) {

      include_once $file;


      /* Only continue if the API class could be loaded properly. */
      if( class_exists( ‘RelatedYouTubeVideos_API’ ) ) {

      $RytvAPI = new RelatedYouTubeVideos_API();

      /* Do your configuration */
      $data = $RytvAPI->validateConfiguration(
      ‘relation’ => ‘postTitle’,
      ‘max’ => ‘3’,
      ‘width’ => 150,
      ‘height’ => 150,
      ‘lang’ => ‘en’,
      ‘region’ => ‘de’,
      ‘class’ => ‘left center inline bg-black’,
      ‘preview’ => true

      /* Search YouTube. */
      $results = $RytvAPI->searchYouTube( $data );

      /* Generate the unordered HTML list of videos according to the YouTube results and your configuration. */
      $html = $RytvAPI->displayResults( $results, $data );

      echo $html; // Or do with it whatever you like 😉


    Rate This Plugin

    Please Login to Rate this Plugin!




    0 Votes
    Not Rated Yet Stats

    Last Updated1849 Days ago
    Published11 years ago

    Report Wrong Category!

    Do you think this Plugin belongs to another Category?

    What Category Should this Plugin belong to? *

    Reason *

    Create a Plugin List

    You need to be Logged in to Create a Plugin List.

    Submit A plugin

    You need to be logged in to submit a plugin.


    WPD is the unofficial online plugin directory of WordPress.

    An attempt has been made to list Only functional, active,efficient and up-to-date plugins.

    Categorized : Plugin are listed by category and subcategory based on functionality and uses. Here you can browse wordpress plugin from our neatly categorized plugin directory and sort the plugins by rating, votes, last updated and published and search plugins using tags.

    Search : Plugins can be searched by their functionality using multi-tag search and you can search plugins using their exact name although we are not ensuring Google like search accuracy.

    Create Plugin Lists : You will be able to create list of plugins and share them with Wordpress Community or you can keep them private and use them as a bookmarks.
    e.g. Plugins That I’ve Used on My Site, Best Event Management Plugins, Christmas Plugins etc.

    If you think certain awesome plugin is not in the directory then notify us through our Submit a Plugin page.

    Browsing the Plugin Directory

    Browse by Category

    In WPD, Plugins are categorized carefully. You can browse all the categories from the homepage or you can access the category lists from any page by clicking the button from the left of the website.

    Browse by Tags

    Each plugin listed in WPD is marked with useful tags. You can browse plugins by Tags from the All Tags page

    Searching in WPD

    Multi Tag Search

    You can search plugins using multiple tags. To perform a multi-tag search. Go to Homepage and then in the search field type any keywords or tags(comma separated) and then click on the search button. To search plugins from a selected category just select the category from the dropdown and type your tags.

    Searching a specific Plugin in WPD

    If you want to find a specific plugin in our directory, Go to Homepage and then select the "Search in Title" option. Then write the name of the plugin and click the search button to find the Plugin.

    Plugin Lists

    Whats a Plugin List

    Plugin Lists are user created lists of plugins. Any registered users can create Plugin Lists and share it with anyone or make it private.

    Why Create a plugin List?
    • Easy to keep track of your favourite and useful plugin.

    • Share list of plugins on blogs, social media or to a client.

    • Keep a track of what plugins you installed in which of your blogs by creating a list for each blog

    Creating a Plugin List

    To create a Plugin List, click the button from the left of the page; a popup box will appear. In the "List Name" field, put the name of the List. eg: Best Seo plugins for your site.
    In the Description field, put a few words describing the List.
    By default, lists are automatically published as public, which is visible to everyone. If you do not want others to see the List, select "Private" from the dropdown list. Then click the "Create List" button to create the list.

    Adding Plugins to your List

    To add a plugin to your List, go to a plugin page and click the "Add to List" button. A popup box will appear where you can select in which of your list you want to add this plugin. You can add a note if you want, this note will appear below the plugin in your list.
    P.S: You can only add plugins that are in our directory.

    Your Lists will appear in our "Plugin Lists" page when you set the list as "Public" and your list contains atleast 2 plugins.

    Editing your Lists

    When you are on your list page, notice there is a button on the top right corner of the page. Click it to edit the List Name and the List Description.

    Accessing All your Lists

    You can access all your Plugin lists by going to your profile and clicking the "Lists" tab.

    Removing your Lists

    You can remove your Plugin lists by going to your profile and clicking the "Lists" tab. on top right of each list click the button to remove the list completely.

    While tremendous effort has been put to keep this directory precise and complete, still errors and omissions are unavoidable and possible. We welcome any suggestions for corrections, deletions, and idea that might improve the overall experience.

    To submit a Feedback click the from the bottom right corner of the site.

    Brave Popup Builder
    Our Latest WordPress Plugin
    Create Awesome WordPress Popups with Intuitive visual Editor. Choose from hundreds of Presets. Create Beautiful Popups and convert more visitors to subscribers, clients and customers.
    This Popup was Built with this plugin.
    Marketing knowledge
    Upgrade your
    Leverage agile frameworks to provide a robust synopsis for high overviews.
    Register or log in to assess the record