wp_insert_post iframe missing

In my install, I use one custom page. Here I put one text field and the fck editor. This is for the title and the content. I need to insert this into a page. I use the following code $my_post = array( ‘post_title’ => $_POST[‘title’], ‘post_content’ => $_POST[‘content’], ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’, ‘post_author’ … Read more

Run oembed separately outside the_content()

I have this structure for my content.php : <div class=”featured”> <!–featured image here–> </div> <h1 class=”entry-title”>Post Title</h1> <div class=”entry-content”> <?php the_content(); ?> </div> I would like to move the first oEmbed in the_content() to the area enclosed by .featured such that the title will appear after the media content. I have come across these few … Read more

Register Embed Handler for Padlet.com

I’m trying and failing to register an embed code for content from padlet.com (strangely it’s supported in WP.com but not WP.org). A URL like https://padlet.com/cogdogblog/aos9fosbbwk4 should embed like <div class=”padlet-embed” style=”border:1px solid rgba(0,0,0,0.1);border-radius:2px;box-sizing:border-box;overflow:hidden;position:relative;width:100%;background:#F4F4F4″><p style=”padding:0;margin:0″><iframe src=”https://padlet.com/embed/aos9fosbbwk4″ frameborder=”0″ allow=”camera;microphone;geolocation” style=”width:100%;height:608px;display:block;padding:0;margin:0″></iframe></p> My attempt that fails so far add_action( ‘init’, function(){ $regex_url=”#https?://padlet\.com/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$#i”; wp_embed_register_handler( ‘padlet’, $regex_url, ‘wp_embed_handler_padlet’, true ); }); … Read more

add oembed provider

I want to add oembed provider to my buddypress activity content I found this function <?php wp_oembed_add_provider( $format, $provider, $regex ); ?> I know I need it to add with init filter I’ve contacted developers of that site and they gave me oembed link. so site is http://www.myvideo.ge/ and they gave me this link: http://embed.myvideo.ge/flv_player/player.php?video_id=xxxx.format … Read more

Getting results from wp_oembed_add_provider

I’m having trouble getting results from wp_oembed_add_provider(). I’m developing a site which needs to embed video content from Facebook, and I came across this handy list of Facebook URL structures. The one I’m focusing on to start with is #https?://(www\.)?facebook\.com/.*/videos/.*#i as this matches the video I’m testing with. Side point: This may or may not … Read more