I am writing a WordPress plugin that will display a devotional image. One of the options I would like to include is image width. I am trying to wrap the image and some text in a div so I can style it and let the user chose some different styling options. However, just trying to set the div width using the variable is not working. It says there is a syntax error.
Any help would be appreciated! Thanks, Nick.
$imageWidth = get_option('devotional_imageWidth','100%');
$content = "<h2>Devotionally Images</h2>";
<div style="width:$imageWidth;">
print '<img src="' .$show_file. '" alt="Image Title Here">';
$content .= "devotional by Devotional.ly";
</div>
return $content;
}
add_shortcode('devotionally','devotionally_function');