Support » Plugin: Viper's Video Quicktags » [Plugin: Viper's Video Quicktags] Custom fields

Viewing 9 replies - 1 through 9 (of 9 total)
  • this one works for me, but how can i put in there a custom field?

    <?php echo apply_filters( 'the_content', '[flv]location[/flv]' ); ?>

    Plugin Author Alex Mills


    Put the URL in the custom field.

    $videourl = get_post_meta( $post->ID, 'some_key', true );
    if ( $videourl )
    	echo apply_filters( 'the_content', "[flv]$videourl[/flv]" );

    thx a lot, man :).


    In my theme, i have a custom template file where i want to show youtube and daily motion video by the video URL. I have only raw URL nothing else.

    Why can’t I get this code to work in my theme? Here is my code,

    <div id=”video”>
    <div id=”video-inside”>
    <?php $videourl = get_post_meta( $post->ID, ‘video’, true ); if ( $videourl )echo apply_filters( ‘the_content’, “[flv]$videourl[/flv]” ); ?>

    But when I load the page if loads blank. Does this no longer work?

    Replace the ” ” around [flv]$videourl[/flv] with ‘ ‘

    I am almost there – the video shows up in the right place but the URL isn’t quite right…

    code used (as above but with vimeo tags instead):

    $videourl = get_post_meta( $post->ID, 'video', true );
    if ( $videourl )
    	echo apply_filters( 'the_content', '[vimeo]$videourl[/vimeo]' );

    results on page:

    <span class="vvqbox vvqvimeo" style="width:635px;height:300px;"><iframe id="vvq-103-vimeo-1" src="$videourl?title=1&byline=1&portrait=0&fullscreen=1" width="635" height="300" frameborder="0"><a href="$videourl">$videourl</a></iframe></span>

    it seems to be the $videourl bit that is going wrong, but i’m afraid i don’t know enough about PHP to figure out why!

    WP version: 3.2.1
    example page:
    video link:


    The $videourl variable is being passed as a string.
    Try this:

    $videourl = get_post_meta( $post->ID, ‘video’, true );
    if ( $videourl )
    echo apply_filters( ‘the_content’, ‘[vimeo]’ . $videourl . ‘[/vimeo]’ );

    xave, you are a star! works perfectly, thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Viper's Video Quicktags] Custom fields’ is closed to new replies.