FLV Embed
do_shortcode PHP not working properly (2 posts)

  1. Luke Mlsna
    Posted 4 years ago #

    This is a great plugin, my favorite flv embedding tool, but I have found one problem: the shortcode cannot be called directly in PHP (for use in templates) using WP's do_shortcode function.

    For example, the code <?php echo do_shortcode( '[flv:/wp-content/uploads/2012/03/header.flv 720 480]' ); ?> does not display a flash video, but simply outputs [flv:/wp-content/uploads/2012/03/header.flv 720 480] as text.

    Perhaps this has something to do with the unusual shortcode structure of [flv:/url] rather than [flv url="url"]? Or maybe I'm just doing it wrong.


  2. stanbdb
    Posted 4 years ago #

    Hi, i believe i found a workaround. Instead of using <?php echo do_shortcode( '[flv:/wp-content/uploads/2012/03/header.flv 720 480]' ); ?> try using <?php echo flv_parse( '[flv:/wp-content/uploads/2012/03/header.flv 720 480]' ); ?>
    flv_parse is a function defined in the plugin code. This solution has worked for me. This thread has led me to this solution.
    Take care, Stan

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • FLV Embed
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic