Posted By

jevets on 02/24/11


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

  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.