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
- 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?
- Disable oEmbed for a Single Shortcode or at Least All Internal Links
- 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
- Forcing WP to embedd a video when using a shortcode
- I’m having a problem viewing the Youtube video
- How To Use YouTube Url Stored In Custom Field To Get Video Image and Set it As Featured Image
- how can i display all youtube videos from a users youtube account
- How to make an image of a YouTube video appear as a thumbnail in the list of blog posts
- Rename Smart YouTube’s httpv back to http for all posts
- Different size video display for category page (smaller) & detail page (larger)
- Thumbnail image doesn’t show up in Shortcode output
- Modify oembed code conditionally
- Keep excerpt from stripping URLs and enable autoembed for youtube ONLY?
- oembed facebook link?
- Add youtube embed to woocommerce variations
- Extract links inside embed tags in WordPress
- Adding an official oEmbed provider to WordPress
- Turn twitter-urls into list timelines?
- display only youtube video sticky post
- You tube videos Appear Different Dimension
- How to make Youtube short code transfer
- How to load post_meta for custom post type via Ajax
- Being notified when some YouTube video in some post becomes unavailable
- feed url problem
- Embbeded YouTube video not showing when admin logged in