I have trouble with using the plugin with custom fields.
I’ve searched the forum, i found only one question about this.
but i don’t catch the ideea.
I want to have the video separated by the_content() – my design requires this. (like one box for video, one for content).
I want to be able to put in a custom field someway [flv]location[/flv]
and show on page the video.
Can you help me?
Thanks a lot!
this one works for me, but how can i put in there a custom field?
<?php echo apply_filters( 'the_content', '[flv]location[/flv]' ); ?>
Put the URL in the custom field.
<?php $videourl = get_post_meta( $post->ID, 'some_key', true ); if ( $videourl ) echo apply_filters( 'the_content', "[flv]$videourl[/flv]" ); ?>
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,
<?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?
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):
<?php $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="http://player.vimeo.com/video/$videourl?title=1&byline=1&portrait=0&fullscreen=1" width="635" height="300" frameborder="0"><a href="http://www.vimeo.com/$videourl">http://www.vimeo.com/$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: http://www.braincubecorp.co.uk/eatme/media/video/this-is-the-title-of-a-video-post/
video link: http://vimeo.com/30391279
The $videourl variable is being passed as a string.
$videourl = get_post_meta( $post->ID, ‘video’, true );
if ( $videourl )
echo apply_filters( ‘the_content’, ‘[vimeo]’ . $videourl . ‘[/vimeo]’ );
- The topic ‘[Plugin: Viper's Video Quicktags] Custom fields’ is closed to new replies.