Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

remove title & suggested videos from youtube link WordPress


I recently purchased the [[LINK href=""]]shaken grid premium theme[[/LINK]] and when adding a youtube link it shows nicely in the grid display and larger in the details display.

I want to know what code I can put or add to remove the Title and Info as well as suggested videos from being displayed and where to put it.

<blockquote>Traditionally doing a simple embed I would add a line like so to the embed after the video id


but I have no clue where to add this in this theme.

I did find some mention of Youtube in the plugins.js on line 115 but this is beyond me & I'm not even sure this is the right place to be looking.

Thanks in advance.

Answers (5)


Manoj Raj answers:

I have tried a simple workaround..Add this code to your header... I tried it and it works...

jQuery(function($) {
var tubesrc = $(this).attr("src");
$(this).attr("src", tubesrc + "&rel=0&showinfo=0");

sly comments:

works at first, but when video is done playing it resets itself to show the title. This is probably the cleanest method if you can sort out the reset.

Will test others now.

sly comments:

<em>*Note. Also when the page loads it initial shows the title then the video refreshes and doesn't show the title.</em>


Christianto answers:

Hi Sly,

Regarding your questions on Manoj Raj's answer,
I think youtube video with "&showinfo=0" will hide the title but if video is done, the title/other info will appear again ( although when you click to play it, the info won't appear )

you can check it on:
it has the same "&showinfo=0" param, and same behavior.


Arnav Joy answers:

can you show me where is video and you want to remove title from it?


Navjot Singh answers:

Try this code in your theme's function.php

* Add Custom Parameters to YouTube Embeds
function namespace_oembed_youtube_no_title( $html, $url, $args ) {

// Only run this for YouTube embeds
if ( !strstr($url, '') )
return $html;

// Get embed URL
$url_string = parse_url($url, PHP_URL_QUERY);
parse_str($url_string, $id);

// Set default arguments
$defaults = array(
'width' => 480,
'height' => 385,
'showinfo' => false,
'rel' => false

// Merge args with defaults
$args = wp_parse_args( $args, $defaults );

// Define variables
extract( $args, EXTR_SKIP );

// Add custom parameter values to IFRAME
if ( isset($id['v']) ) {
return '<iframe width="' . intval($width) . '" height="' . intval($height) . '" src="' . $id['v'] . '?rel=' . intval($rel) . '&showinfo=' . intval($showinfo) . '" frameborder="0" allowfullscreen></iframe>';

return $html;
add_filter('oembed_result', 'namespace_oembed_youtube_no_title', 10, 3);

[[LINK href=""]]Source[[/LINK]]

sly comments:

doesn't work.


Abdelhadi Touil answers:

If you post videos by just pasting youtube video link in the post editor, then you can use a free plugin called "Smart YouTube PRO" that I use always in my websites, and it's do all things you want easily and automatically:

[[LINK href=""]][[/LINK]]

Good luck.