Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Hide YouTube RELATED videos for the 1000000 time…
New Landing › How can we help? › Cardinal › Hide YouTube RELATED videos for the 1000000 time…
- This topic has 17 replies, 5 voices, and was last updated 9 years by Mohammad – SUPPORT.
-
Posted in: Cardinal
-
March 20, 2015 at 6:51 pm #159470
So this has come up about a million times in the past, but with no solid resolution.
When I embed a youtube video using the page builder it shows related videos at the end. The related videos are from other companies… no need to explain why that’s a bad thing…
I tried all the URL tricks suggested by Google… &rel=0…. and others… No change. Cleared the Cache… No change…
I installed Hide related video plugin… no change. re-installed it several times… nothing…
I know there is a way to do this… because many wordpress sites are doing it…
Hide YouTube Related Video author sugeessted that it is a theme issue… “the theme is grabby with the oembed feature…”
Any ideas…?
March 20, 2015 at 6:52 pm #159472This reply has been marked as private.March 20, 2015 at 7:08 pm #159477Also is there anyway to get the YouTube progress bar on the bottom back? If so what code do I need to change…?
March 23, 2015 at 7:52 am #159731Hi,
Please paste this code at functions.php of child theme.add_filter('sf_youtube_embed_params','sf_youtube_param'); function sf_youtube_param($param){ $param = '?wmode=transparent&rel=0'; return $param; } add_filter('sf_youtube_embed_src_params', 'sf_youtube_param_new'); function sf_youtube_param_new($param){ $param = '?autoplay=1&wmode=transparent&rel=0'; return $param; }
Thanks
MohammadMarch 23, 2015 at 8:08 am #159740Perfect! Works great. No issues what so ever, so far. ๐
It might be helpful to add this feature as an option in the theme somehow… just an idea…
Thank you Mohammad.
March 23, 2015 at 8:09 am #159743Hi,
You most welcome.
Thanks
MohammadAugust 12, 2015 at 9:23 pm #203435Thanks ๐
August 12, 2015 at 10:20 pm #203444No problem. Thanks Mohammad.
-RuiAugust 19, 2015 at 6:40 pm #205535I get the following error when trying to add this to the child functions.php file. Please advise.
Fatal error: Cannot redeclare sf_enqueue_styles() (previously declared in /home/wp_mafu5g/lgassoc.com/wp-content/themes/flexform-child/functions.php:126) in /home/wp_mafu5g/lgassoc.com/wp-content/themes/flexform/functions.php on line 144
August 20, 2015 at 9:57 am #205662I didn’t have any issues so far… it seems unrelated to the filter, but try all the usual methods to narrow down the issue…
*make a full backup
1. update all the theme files, plugins…
2. clean out the cache… browser and WP
3. temporarily remove other filters…if any…
4. deactivate other plugins which have the same/similar function…
5. deactivate all plugins unrelated to the theme… deactivate everything except plugins that came with the theme.
6. make sure to copy all the lines of the code… 1 to 13
7. temporarily remove all .htaccess code…after each step clean out cache and test…
These should help you to narrow it down… if not, I think it’s a good idea to provide your Admin login details in a PRIVATE REPLY… just to make things go by faster… shouldn’t be a hard fix…
we have a good team looking out for us ๐
Good luck
August 20, 2015 at 12:31 pm #205753This reply has been marked as private.August 20, 2015 at 10:50 pm #205968@tangent24 – sounds like you have copied the functions.php file to the child theme? This isn’t correct – use this child theme as a starting point: http://d.pr/f/ng0E/1PRqo4Dt
– Ed
August 21, 2015 at 3:40 am #206027Thanks, Ed. That dealt with the error code! However, I’m still not sure how this changes how the videos are embedded. I have tried adding the &rel=0 code directly to the source URL, but it just errors out. If I leave the basic YouTube URL is doesn’t add the proper code suffix and related videos still appear at the end (though it does include “&feature=oembed”). Is there a toggle or a setting I’m missing? Note: I am using the Flexform theme (not Cardinal)…does that make a difference when using the child functions.php file you provided? If so, do you have a clean copy of a child functions.php file for Flexform?
Your support is much appreciated, as always.
August 21, 2015 at 4:41 pm #206318Hi,
I just forward the topic to Ed so he can reply you.
Thanks-Rui
August 24, 2015 at 6:29 pm #206903Thanks, Rui. No word from Ed yet. Should I reach out directly? We really need to resolve this video issue ASAP! Your support (and Ed’s) is greatly appreciated.
-
Posted in: Cardinal
You must be logged in and have valid license to reply to this topic.