Custom logo to theme
-
Hi there,
I’m developing a custom theme and have added a custom logo option in functions.php. I’ve used the code so kindly provided by isme here.My problem is it uses short code for the output. This goes into header.php:
<?php do_shortcode(‘[sitelogo]’); ?>
I have this code which will add the page title and description if no logo is added, and it contains the shortcode for the output:
function get_site_logo(){
$option=get_option(“logo_options_group”);
if($option[‘url’]){
echo “<div class=\’logo2\’><img src='”. $option[‘url’] .”‘ /></div>”;
} else {echo “<div class=’logo’><h1 class=’site-title’>” . $bloginfo = get_bloginfo( $show, $filter ) . “</h1></div><div class=’tagline’>” . $blog_title = get_bloginfo( ‘description’ ) . “</div>”;}}add_shortcode(‘sitelogo’, ‘get_site_logo’);
Can anyone tell me how I output the results without using short code?
Many thanks
- The topic ‘Custom logo to theme’ is closed to new replies.