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?
- How do I get a YouTube video thumbnail from the YouTube API?
- Failed to execute ‘postMessage’ on ‘DOMWindow’: https://www.youtube.com !== http://localhost:9000
- Heartbeat API oEmbed
- WordPress oEmbed W3C Validation
- How to change thumbnail of embedded Youtube video?
- Lightbox Plus ColorBox plugin and auto playing YouTube video
- Iframes inside bootstrap tab disappear when tab is shown
- Cannot embed YouTube videos “Failed to embed” error
- Styling text and images in the_content()
- How to auto embedded youtube with wp_insert_post()
- Conditional check for embedded video in the_content
- Viddler oEmbed not working with specified width
- oEmbed, thumbnails and wordpress
- How do I embed a YouTube video in WordPress 3.0?
- WordPress keeps autoplaying my Youtube-Links no matter what I write
- How to make my new theme read [youtube id=”id of the video here” width=”600″ height=”350″]?
- Auto embeding Vimeo/Youtube in custom fields (tinyMCE editor)
- How to make an embeded a Youtube video from custom field text responsive to screen size?
- Embedding Youtube video on comments
- Echo do shortcode with custom field not working
- YouTube API 403 error when website restriction set
- How to make enqueue_embed_scripts work with the embed_template filter
- iframe with Youtube video appears for logged-in users, but not for incognito users
- How to change src link in YouTube?
- add youtube thumbnail in index and single.php add video
- Add class and change src type inside wp_oembed_get
- Auto embeds don’t work for attachment descriptions
- How to disable URL preview in WordPress comments
- Iframe Youtube video doesn’t work
- Post editor doesn’t save embed media [closed]
- Custom YouTube Plugin loading different PHP library on live site and localhost
- Order Posts By Youtube Views
- Widget to embed youtube video
- Can someone please help me find a solution to my youtube embed problems? [duplicate]
- Pull latest Youtube Video from json url and make new post