Articles of oembed

Add parameter to first post only

I’ve set up a custom post type called “Videos”. I have assigned an ACF oEmbed custom field to “Videos”. On the archive page, I have a loop which queries the custom post type and displays all of the videos. I would like to autoplay only first (latest) video that is posted at the top. The […]

What are available arguments for wp_oembed_get?

I used wp_oembed_get function to embed a YouTube video. It worked like it should. Now I want to add a class to an embedded element. Is there an argument for this? Can’t find list of arguments for this function anywhere. I tried ‘class’ but it didn’t work.

oEmbded with wp_insert_post()

I try to add articles via wp_insert_post but as it seems the oEmbed function of WordPress doesn’t work properly. I work with embedly as you can embed any website. I realized that the oEmbed functionallity is triggered after saving the post in the WordPress-Backend. Can i trigger the Embed somehow programmaticly? Wrap the URL with […]

WordPress, oEmbed & YouTube video's with a 'dash'

I am having an issue where a video with a ‘dash’ (-) in the url are not being embedded in WordPress. This is happening when pasting the URL into a page / post and is also able to be reproduced when using the wp_oembed_get command. The YouTube URL in question is: Any YouTube URL […]

Removing WordPress Icon from oembed link footer

I am trying to remove the default WordPress icon that displays on oembed links when there is no site icon. Here is a link to the site(3 links at the bottom) I have tried altering the code from the embed_site_title_html function and adding it to my theme’s functions.php file. This is how I added […]

wp_embed_register_handler is not working

I used this function for other video hosts, but for some reason, now it’s not working. This is the direct and embed code of the video <IFRAME SRC=”” FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=640 HEIGHT=360 allowfullscreen></IFRAME> and this is my registration function. add_action( ‘init’, function() { wp_embed_register_handler( ‘vidoza’, ‘#https://vidoza\.net/([a-zA-Z0-9_-]+)$#i’, ‘vidoza_embed_handler’ ); } ); function vidoza_embed_handler( […]

Div around YouTube video

My posts have YouTube embedded videos in the form of: <object width=”600″ height=”400″ classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”,0,40,0″><param name=”src” value=”;vq=hd720″ /><embed width=”600″ height=”400″ type=”application/x-shockwave-flash” src=”;vq=hd720″ /></object> How do I wrap a <div> around it? I’ve tried adding the following to the functions.php file: add_filter(’embed_oembed_html’, ‘my_embed_oembed_html’, 99, 4); function my_embed_oembed_html($html, $url, $attr, $post_id) { return ‘<div id=”video”>’ . $html […]

oEmbed youtube video aspect ratio

When I insert youtube video in my post by just putting the link( The video aspect ratio becomes 4:3. How can I change to 16:9?

Forcing oembeds to top of post

What’s the best way to force oembed (or shortcodes too) to the top of a post? I’d like to feature youtube embeds before the actual article content, regardless of where the link was inserted. Any ideas?

Auto embeding Vimeo/Youtube in custom fields (tinyMCE editor)

I’m using 2 extra TinyMCE editors on my pages to add extra textfiels in my theme pages. I now realize that the auto-embed feature is not supported on content delivered thought custom fields. So i need to tell WordPress to enable this on these two extra custom fields. Here is an example of the back-end […]