I’m having a problem finding a code that will display text (<?php bloginfo('name'); ?>
) when no image has been defined in the img src= (<?php echo get_option('to_logo'); ?>
). This works in Firefox, of course, as a simple alt tag. But doesn’t cut it in all browsers.
<a class="logo" href="<?php echo get_option('home'); ?>" title="<?php bloginfo('name'); ?>">
<img src="<?php echo get_option('to_logo'); ?>" title="Logo" alt="Logo" />
</a>
Wouldn’t it be simpler just to do something like:
This looks like WordPress. You can try to first test the image source to see if it is empty:
You can try this: