create widget to view video stream from custom field
Using embedly plug-in, I want advertisers to be able to show a video - embed code entered in one of their custom fields - and for that field to be displayed in a widget in sidebar. It is just one field that I want to put in there.
Presumably I go to theme-widgets.php and create a new widget. You gave me the code to insert a field outside the loop so I know WHAT to install, I just need to know what the code is to write the widget WHERE I can install it.
Does anyone have the code to write a simple box with one line of text as a title for it and then to include the code as advised below?
<?php
global $wp_query;
$postid = $wp_query->post->ID;
echo get_post_meta($postid, 'customField', true);
?>
I tried using a text widget to create it but all it showed was the code not the video.
Please help.