Posted By

jevets on 02/24/11


Tagged

wordpress video embed shortcode


Versions (?)

WP do_shortcode to embed video


 / Published in: PHP
 

Embed a video via PHP without using the_content filter in WordPress. From luckykind at http://wordpress.org/support/topic/call-function-called-by-embed-shortcode-direct

  1. <?php
  2. $wp_embed = new WP_Embed();
  3. $post_embed = $wp_embed->run_shortcode('[embed]your-video-url[/embed]');
  4. ?>

Report this snippet  

You need to login to post a comment.