How about this shortcode:
function alternative_youtube_embed_func( $atts ) {
$a = shortcode_atts( array(
'id' => 'ScMzIvxBSi4' // youtube video ID from video URL
), $atts);
return '<a href="https://www.youtube.com/watch?v=' . $a["id"] . '" rel="noopener noreferrer" target="_blank"><img width="560" height="315" src="https://img.youtube.com/vi/' . $a["id"] . '/0.jpg" alt="link to youtube video" /></a>';
}
add_shortcode( 'alternative-youtube-embed', 'alternative_youtube_embed_func' );
Add a play-button overlay with CSS, and voilà.
Additional Info:
You might want to remove the embed blocks so users can’t use them, see here.
Related Posts:
- WordPress 5.3.x YouTube oEmbed is not working
- When oEmbed fails, display an alternative
- How can I clear oEmbed caches for YouTube on posts as they are loaded
- How add class youtube and type/html to oembed code?
- How to change default width parameter of embedded video in wordpress?
- How to Replace YouTube Videos with a “Click to Play” Thumbnail?
- YouTube oEmbed and privacy-enhanced mode
- Is it possible to remove height and width attributes from oEmbed video embeds
- Modify youtube video size on one page and show another size on different page
- how to escape wp_oembed_get for phpcs
- Fallback for oEmbed content
- Changing Oembed max width based type of page
- WordPress refuses to show oembed URL
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- Problems using WP’s oembed function + Instagram + AJAX
- Manipulating oembed_dataparse stopped working for YouTube embeds
- How to increase image size returned from Flickr oEmbed in Twenty Twelve theme
- How to get the oEmbed type (audio, video, image etc.)?
- Disable automatic oEmbed of a youtube url within the content
- Add parameters vimeo videos using wordpress embeds
- oEmbed youtube video aspect ratio
- oEmbed fails half of the times. Could I reload the request on fail?
- Adding a wrapper to the youtube embed automatically?
- Get all Youtube video’s from posts and embed them on a different page
- Getting results from wp_oembed_add_provider
- add oembed provider
- Register Embed Handler for Padlet.com
- How to Hide Ancestors/Threads in Embedded Tweets
- Use oEmbed in List Items
- Use Auto Embed with get_post()
- How to modify the HTML formatting of an oEmbed link?
- OEMBED seems to have stopped working
- WordPress, oEmbed & YouTube video’s with a ‘dash’
- Embeding YouTube video via a template function throws iframe cross-domain policy error
- oEmbed not recognising Vimeo URLs
- Video Embed with Captions in Turkish
- Applying an oEmbed filter to a custom post type
- How to oEmbed MySite in WordPress
- Worrisome oembed hits
- How can I grab the video id of youtube?
- What is the correct oembed provider base url for self-hosted wordpress sites
- Why is my oembed function modifying Twitter embed?
- oEmbed not working in WordPress
- Problem with oEmbed in some themes
- JSON in oembed not being internationalized (using QTranslateX)
- How to apply an ID to Shortcode Embedded iframe
- WordPress kills an iframe’s apostrophes
- How to embed YouTube videos in posts without adding suggested videos at the end?
- Div around YouTube video
- Add title attribute to oEmbed iframe for accessibility
- What are available arguments for wp_oembed_get?
- Add parameter to first post only
- Looking to Customize YouTube Video Embeds
- Is there a way to find all posts with Youtube video embedded?
- WordPress fails to embed video URL on specific theme
- How to add srcdoc attribute to YouTube oEmbed in Gutenberg oEmbed Block
- How to modify the HTML output of Gutenberg block? (Youtube)
- How to disable oembed cache service?
- Advanced Custom Fields oEmbed video width and height
- How to set parameters for a Twitter post using wp_oembed_get (remove rounded borders)?
- WordPress Mediaelement – Youtube Videos Embed Options
- Use oEmbed for static html
- class-oembed Error
- Wrap iframes/embeds, but do it before oEmbed happens
- When formatting an oEmbed iframe, how (and where) does WordPress determine the height value?
- add_filter is failing to append &rel=0 to end of YouTube URL in oEmbed
- Disable the buildin embed only in the editor
- How do I get a YouTube video thumbnail from the YouTube API?
- YouTube Autoplay not working
- YouTube: How to extract closed caption transcript from YouTube video?
- Is there a way to get all IP addresses of youtube to block it with Windows Firewall?
- YouTube maxresdefault thumbnails
- Youtube – downloading a playlist – youtube-dl
- ‘NoneType’ object has no attribute ‘group’
- How do I get a YouTube video thumbnail from the YouTube API?
- Youtube api – stop video
- Youtube_dl : ERROR : YouTube said: Unable to extract video data
- How do I hide related videos at the end of a YouTube playlist embed code?
- URL syntax for Youtube video in fullscreen and start at time index
- Disable play/pause/full screen for HTML5
- Failed to execute ‘postMessage’ on ‘DOMWindow’: https://www.youtube.com !== http://localhost:9000
- How to embed a youtube playlist with a sidebar
- YouTube: How to present embed video with sound muted
- How to customize an end time for a YouTube video?
- How to embed an autoplaying YouTube video in an iframe?
- How can I embed a YouTube video in a WordPress template page?
- Setting a post’s featured image from an embedded YouTube video
- Use [embed] filter in template files
- Do_Shortcode not working for Embed
- How to wrap oEmbed-embedded video in DIV tags inside the_content?
- How do I embed youtube videos with https instead of http in the URL?
- WP Oembed not passing through the “autoplay=1” variable
- What are the Oembed Links For?
- how to create a conditional content_width for a wordpress theme?
- static variable loop not working in WordPress
- Get first video from the post (both embed and video shortcodes)
- Featured Image of Video from oembed
- Apply the_content filter to a custom field with multiple values
- oEmbed, thumbnails and wordpress
- Implementing “Video of the Day” Feature?