Embed WordPress Admin in an iframe

By default WordPress doesn’t allow to embed the admin pages into a frame. From wp-includes/default-filters.php: add_action( ‘admin_init’, ‘send_frame_options_header’, 10, 0 ); To enable embedding, remove the action in a plugin: remove_action( ‘admin_init’, ‘send_frame_options_header’ ); Be aware of the security implications. I wouldn’t do that.

Convert all youtube link to embed

EDIT After reviewing your edit, you may want to try following These Instructions To embed a video or another object into a post or page, place its URL into the content area. Make sure the URL is on its own line and not hyperlinked (clickable when viewing the post). It sounds like you would want … Read more

Removing WordPress Icon from oembed link footer

Here’s the code to remove the site icon markup from embeds: add_filter(‘get_site_icon_url’,’__return_false’, 10, 3); If you want to remove the entire site-icon + site-title then use this: add_filter(’embed_site_title_html’,’__return_false’); The right thing to do though would be to upload your own site-icon in the WordPress customizer and show-off your branding. Min image size it needs is … Read more

ted talks embed fixed, but can’t control size

You can control the size of the embedded TED video by using the shortcode: [ted id=”1650″ width=”300″ height=”200″] If you want to have it predefined, you can use: if(!isset($atts[‘width’])){ $atts[‘width’]=600; // Default width } if(!isset($atts[‘height’])){ $atts[‘height’]=400; // Default height } so the code here will be: // Whitelist the TEDTalks oEmbed URL wp_oembed_add_provider( ‘http://www.ted.com/talks/*’, ‘http://www.ted.com/talks/oembed.json’ … Read more

Is it possible to modify the default YouTube embed attributes string?

There is a filter with the same name as the function wp_embed_handler_youtube https://developer.wordpress.org/reference/hooks/wp_embed_handler_youtube/ add_filter(‘wp_embed_handler_youtube’, ‘ehy_callback’, 10, 4); function ehy_callback($embed, $attr, $url, $rawattr){ //make necessary changes here return $embed; } You can add the code in functions.php of your child theme.

How do I embed in a text widget?

Shortcodes are not supported in the Text Widget by default. Add the following to your functions.php: // Enable shortcodes in WP Text Widget add_filter( ‘widget_text’, ‘shortcode_unautop’); add_filter( ‘widget_text’, ‘do_shortcode’, 11); Instead of wrapping the video URL in the shortcode, use the following in the Text Widget: For more info on the shortcode, see the Codex.