Hi I want video link will call custom field
This is my code:
<?php the_post_thumbnail('slider-thumb', array('class' => 'rsImg', 'data-rsvideo' => 'http://www.vimeo.com/61893383' )); ?>
My code is:
<?php the_post_thumbnail('slider-thumb', array('class' => 'rsImg', 'data-rsvideo' => '<?php echo get_post_meta($post->ID, video, true); ?>' )); ?>
There are no syntax errors. But video is not running.
Please help me.
You are nesting PHP tags. That’s not correct.
And as per the correct syntax in your first example, it accepts a URL.
Let’s say your function
get_post_meta($post->ID, video, true);
returns a proper URL, then you can modify your code like this –