動作しません。予期しない T_STRING が発生します
 <?php $customfield = get_post_meta($post->ID, 'bannerurl', true);
    if ($customfield == '') { 
        echo '<img src="<?php echo get_post_meta($post->ID, 'bannerurl', true); ?>" alt="text" />'; 
     }
    ?>
動作しません。予期しない T_STRING が発生します
 <?php $customfield = get_post_meta($post->ID, 'bannerurl', true);
    if ($customfield == '') { 
        echo '<img src="<?php echo get_post_meta($post->ID, 'bannerurl', true); ?>" alt="text" />'; 
     }
    ?>
以下のようにしてみてください:
   //if $customfild exist than below will execute else "No Data".
    if (isset($customfield)) { 
    echo '<img src="'.get_post_meta($post->ID, 'bannerurl', true).'" alt="text" />'; }
    else
     echo "No Data";
これを試して
<?php $customfield = get_post_meta($post->ID, 'bannerurl', true);
    if ($customfield == '') { 
        echo '<img src="get_post_meta($post->ID, 'bannerurl', true)" alt="text" />'; 
     }
    ?>