Trying to use a variable to set image width

Below code is the code to use

$imageWidth = get_option('devotional_imageWidth','100%');   
    
$content = "<h2>Devotionally Images</h2>";

$content .= '<div style="width:' . $imageWidth. ';">';
$content .= '<img src="' .$show_file. '" alt="Image Title Here">';
$content .= "devotional by Devotional.ly";          
$content .= '</div>';

    return $content;

Drop a comment below

Be the first to comment

Leave a Reply

Your email address will not be published.


*