Hello, one of our sites (www.centrodimedicina.com) has a custom field for embedding videos from Youtube. The field is of type "embedded media" and it accepts strings like "hidden link", but it does not accept strings with the domain "youtube-nocookie.com". How can we use the embed in cookieless mode? Is there a patch to do this? We need a solution that doesn't force us to replace the hundreds of "embedded media" fields that have already been created.
Thank you,
Hi,
Thank you for contacting us and I'd be happy to assist.
The Toolset's embedded media type field uses the WordPress 'Embeds' feature ( ref: https://wordpress.org/support/article/embeds/ ), which doesn't support the 'youtube-nocookie.com' URLs.
( ref: https://core.trac.wordpress.org/ticket/44610 )
A workaround can be to use the Types fields shortcode, to construct the iframe code for the embed manually. For example, if the field's slug is 'embedded-media-field-slug', the code would look like this:
<iframe src="[types field='embedded-media-field-slug' output='raw'][/types]" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar