Not sure how to use if function exists
I’m building a page within the admin area. I’ve added the option to upload a custom logo. But if no logo is uploaded I’d like the theme to use the page title.
The code for the logo function is:
<?php $options = get_option('plugin_options'); ?> <img src="<?php echo $options['logo']; ?>" alt="Logo" />
But if no logo is uploaded, it should show:
<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
Is this possible using if function_exists?
Thank you so much for any advice!
- The topic ‘Not sure how to use if function exists’ is closed to new replies.