Disable related videos in youtube playlist

Posted in: Newspaper
Post count: 2

How can I disable this feature when use Youtube Playlist. From post of Bogdan B (Link: https://forum.tagdiv.com/topic/how-to-turn-off-suggested-videos-on-youtube/#post-64189), I added “?rel=0” into td_video_support.php file but it doesn’t work.

Post count: 23312

Hello trinitron1980,

I have tested on my side and everything seems to work as properly. Please try to make this modification here -> http://screencast.com/t/jgmTj6Ljg clear all your caches and check the results.

Thanks for the message!

Post count: 2

Thank you Catalin for your answer. I checked and found that modification affect on single youtube video. When I used youtube playlist, that code doesn’t work. I made modification from tagdiv_theme.js and tagdiv_theme.min.js:


youtubePlayer.tdYtPlayer = new YT.Player(youtubePlayer.tdPlayerContainer, {
playerVars: {
//modestbranding: 1,
//showinfo: 0,
autoplay: youtubePlayer.autoplay,
rel: 0
},
height: '100%',
width: '100%',
videoId: videoIdToPlay,
events: {
'onStateChange': youtubePlayer.onPlayerStateChange
}
});

And it worked.

Post count: 23312

Hello trinitron1980,

I am glad that you could manage your problem.

Thanks for the message!

Post count: 7

I Have tried both , but still it doesn’t work for me. Kindly Help Me

URL : http://www.samajalive.in

Post count: 23312

Hello honny singh,

Where did you have added this code? Notice that the theme uses the tagdiv_theme.min.js as you can see here -> https://www.screencast.com/t/6QJtjxJ5LVK Make the change in that folder and check the results.

Thanks for the message!

Post count: 7

Already Added in code in tagdiv_theme.min.js but still it was not working

Code added: http://www.samajalive.in/wp-content/themes/samaja/js/tagdiv_theme.min.js?ver=8.6

yYou can see here:

https://i.imgur.com/Erc3dVk.jpg
http://www.samajalive.in/

Post count: 23312

Hello honny singh,

I have inspected your tagdiv_theme.min.js and you did not add correctly, sorry! https://www.screencast.com/t/UGhupyAsqc8O -> There is not the right method to simply add the code at the bottom of the tagdiv_theme.min.js The modification should have to be done in the tagdiv_theme.js and then, that code you will have to minified and then replace it with the tagdiv_theme.min.js. To minify your js you should use an online tool, like this -> https://www.minifier.org/

Thanks for your understanding!

Post count: 2

Thanks for the reply. I tried to follow the steps described in the thread by adding the files to the same path in my child-theme but still taking the path of the parent theme. I hope I explained correctly.
What solution does this have?

Post count: 23312

Hello portalservicios,

Please notice that the js of the theme cannot be overwritten with the child theme and therefore, this change cannot be made using the Child Theme, sorry!

Thanks for your understanding!

Post count: 8

Hello Catalin,

I’m sorry I’m a real beginner.

I’m trying to follow your steps but I’m not sure I’m doing right.

I’ll list here the steps I do:

1 – I open “cPanel” and then “File Manager”
2 – I look for the file ” tagdiv_theme.js” with the search mode, and I find it in this route: public_html/wp-content/themes/Newspaper/js
3 – I find the code and I replace it with the new one.

I think I have rightly corrected it. But at the moment I do not see results. I do not know how to send you a link or a screenshot.

4 – I understood that I have to do one step more ” that code you will have to minified and then replace it with the tagdiv_theme.min.js”, but I really don’t know what this means and how to do that.

If I have done everything well until now, can you help me with the final step? Thank you really much.

Post count: 23312

Hello SMNBLOG,

If you want to provide me with more screenshots you should use the Jing online tool for more screenshots. Also, you should not edit any js scripts file because the theme should works as expected by default. What exactly you want to get and you can not? Before this, strictly follow our useful guide for theme installation from here -> https://forum.tagdiv.com/install-via-ftp/

Thanks for your understanding!

Viewing 12 posts - 1 through 12 (of 12 total)
The forum ‘Newspaper’ is closed to new topics and replies.