I have the following code which displays currently a YouTube video via html embed code.
<?php
if ( function_exists( 'wpmudev_ppw_html' ) ) {
$html = '<iframe width="560" height="315" src="https://www.youtube.com/embed/-uiN9z5tqhg?wmode=transparent&" frameborder="0" allowfullscreen></iframe>'; // html code to be protected (required)
$id = 1; // An optional unique id if you are using the function more than once on a single page
$description = 'video'; // Optional description of the protected content
$price = '1.50'; // Optional price for a single view. If not set, price set in the post will be applied. If that is not set either, Unit Price in the Global Settings will be used.
echo wpmudev_ppw_html( $html, $id, $description, $price );
}
?>
I would like to remove the YouTube iFrame and have it display the following code instead.
<img class="img-responsive img-thumbnail" src="<?php the_field('macro_map'); ?>" />
However, the PHP code in the $html= line causes a syntax error when done like so...
$html = '<img class="img-responsive img-thumbnail" src="<?php the_field('macro_map'); ?>" />';
First, is it even possible for this to work. If so, what am I doing wrong?