Forum Replies Created
-
-
Thank you very moch ! Martin , You’re a good Master.
Thanks , Is’t that ?
=============== code ===============
add_filter( ‘the_content’, ‘svp’ );
function svp( $content ) {global $post;
$content=”do_shortcode(‘[fvplayer src='.get_post_meta($post->ID, 'shop-video', true).' splash='.get_post_meta($post->ID, 'shop-img', true).']‘);”.$content;
return $content;
}=============== code ===============
but still not work >_<…
So I try other way:
=============== new code ===============
add_filter( ‘the_content’, ‘svp’ );
function svp( $content ) {global $post;
$shopvedio = get_post_meta($post->ID, ‘shop-video’, true);
$shopimg = get_post_meta($post->ID, ‘shop-img’, true);$content=’[fvplayer src='.$shopvedio.' splash='.$shopimg.'];’.$content;
return $content;
}
=============== new code ===============It’s work, but display Notice:
Notice: Undefined index: disablesharing in F:\xampp\htdocs\xxx\wp-content\plugins\fv-wordpress-flowplayer\models\flowplayer-frontend.php on line 749
How to fix it ?
Hello Martin,
Thank you for your reply.
I want add a new feature on my wordpress:
1. Add two custom field on wordpress : shop-video and shop-img .
2. Add codes into functions.php : When two custom field have something , will display video.Do you understand me, sir?
================== code , not work ==================
add_filter( ‘the_content’, ‘svp’ );
function svp( $content ) {$content=”<?php echo do_shortcode(‘[fvplayer src='.get_post_meta($post->ID, 'shop-video', true).' splash='.get_post_meta($post->ID, 'shop-img', true).']‘); ?>”.$content;
return $content;
}================== code , not work ==================
I found this :
<?php echo apply_filters(‘the_content’, ‘[flowplayer src= splash= ]‘);?>
but how to set up a custom_field variable for the URL of the video ?
like :
<?php echo get_post_meta($post->ID, ‘name’, true); ?>
hello ?