I am new to php so still learning and could really use some help. I am using Custom Meta Boxes to create a custom theme option on a Wordpress theme I have designed. The idea being that the user can upload a custom logo etc and it will get inserted into the relevant part of the theme.
The code used to insert the logo into my header is currently:
<a href="<?php echo home_url(); ?>">
<img src="<?php echo theme_option( theme_logo ); ?>" alt="Logo" class="logo-img">
</a>
What I want to do is add a fallback option so that if a logo is not uploaded, a default one will be displayed.
I have heard about if else but I am unsure how to implement it with the metaboxes. Can anyone help me please?
ANSWER - I have removed this and used WP Theme Customizer instead and it's much easier :-)