Archived topic
YouTube videos showing correct size on mobile
26 replies · Started by Travis on January 12, 2018
Make sure you click Save changes and activate.
You have to click the Save Changes and Activate! ... not just Save! LOL :)
The description is optional ... there for your use only.
Unless.. my ISP is caching pages and I can't seem to fly above it? Here is an example post where the videos at the top are all too big on my phone. https://www.travisharris.com/blog/dover-hall-wedding/ Is this is the for anyone else?
Perhaps it is working, and I can't "see it" yet?
Yeah, I don't see that button anywhere. Next to "Save changes" it says.. "save changes and deactivate", then it says export and delete. Thous are the only options
I just had another look at the code you posted and it is not correct. The correct PHP is:
function alx_embed_html( $html ) {
return '<div class="video-container">' . $html . '</div>';
}
add_filter( 'embed_oembed_html', 'alx_embed_html', 10, 3 );
add_filter( 'video_embed_html', 'alx_embed_html' );
Here is a screen shot of mine. It looks different. I only have the save button. Maybe it activates automatically?
[IMG]https://www.mediafire.com/convkey/e5a9/o66066mpjuv65666g.jpg[/IMG]
I will replace the code, and see what happens!
I see that you cant zoom in on my pic LOL. But, mine says save and DE activate. vs. yours says activate. Weird.
That just means it's already activated.
That snippet will only work with videos that are embedded via oembed I believe. If you create a new test post or page and paste the video URL into the Visual editor, does it work (after you save)?
Tom! You are exactly correct! I made a new test page, and yes.. the video is displaying properly on the phone.
So..
Is there a way that I can make this all happen without having to edit each post (this puts me back at square one).
What about that Java that I posted from my tech reply based on my last theme? Would that work (see above / previous post).
If so.. how can I enter this into GP?
Second thought... I am just going to manually re-embed the video links with the method listed above. It's not too bad, and likely will be a faster result.
Thank you all so much!
That's definitely what I suggest, but perhaps only re-saving the page will trigger the code? Not likely, but worth a shot.