WordPress.org

Ready to get started?Download WordPress

Forums

FLV Embed
do_shortcode PHP not working properly (2 posts)

  1. Luke Mlsna
    Member
    Posted 2 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.

    http://wordpress.org/extend/plugins/flv-embed/

  2. stanbdb
    Member
    Posted 2 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

About this Topic