Hello all WP friends!
I am new on WordPress but i already love it jaja,)
I begin a website and i would like to put a Short Youtube Video first only on the Italian part for testing.
so after a lot of time i succeed with this code with 9-16 ratio and using WP Code plugin to insert by php:
$langue = get_locale(); if ($langue == ‘it_IT’) { $content = get_the_content(); $has_video = preg_match(‘/<div class=”wp-block-embed__wrapper”>(.*?)<\/div>/s’, $content, $matches); if (!$has_video) { echo ‘<figure class=”wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-9-16 wp-has-aspect-ratio”><div class=”wp-block-embed__wrapper”>[youtube ‘; } }
I try to reduce the size of the video by 50% by many way but it didnot work good!
I guess there is a simple command to do but i don’t find it,)…
You can check here at the end of the page that the video is too big:
[https://wikihhc.com/it/])
( only on /it/ folder)
🙏
Thank you so much by advance,)
🙏
