Wordpress genesis theme - change logo from text to graphics

I use the Vanilla Geneis theme without a child, but I cannot find where the logo should be. I can change favicon without worries, but I don’t see any logo file, and I don’t see any tips on how to add a “parent” to the theme - I do not use a child.

Is there any way to add a logo. I changed the settings in wordpress for the logo, not the text (in the header settings). Any ideas?

+5
source share
2 answers

Although I did not do this on the Genesis theme by default, I replaced the main title with text with only the logo. I posted how I did it on the Genesis forum , but here it is.

genesis_do_header , genesis_do_header , functions.php.

functions.php :

// Replace header hook to include logo 
remove_action( 'genesis_header', 'genesis_do_header' ); 
add_action( 'genesis_header', 'genesis_do_new_header' ); 
function genesis_do_new_header() { 
    echo '<div id="title-area"><img src="your/logo/image.jpg" alt="Site Logo" />'; 
    do_action( 'genesis_site_title' ); 
    do_action( 'genesis_site_description' ); 
    echo '</div><!-- end #title-area -->'; 
    if ( is_active_sidebar( 'header-right' ) || has_action( 'genesis_header_right' ) ) { 
        echo '<div class="widget-area">'; 
        do_action( 'genesis_header_right' ); 
        dynamic_sidebar( 'header-right' ); 
        echo '</div><!-- end .widget-area -->'; 
    } 
}  

CSS :

#title-area img {
    float:left;
}

, . , , , , .

+6

- , , , :

, functions.php. , .

/** Remove Title & Description **/
remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
remove_action( 'genesis_site_description', 'genesis_seo_site_description' );
/** Remove default site title and add custom site title **/
remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
function custom_site_title() { 
     echo '<a href="'.get_bloginfo('url').'" title="My Website"><img src="'.wp_get_attachment_url(254).'" alt="My Website"/></a>';
}
add_action( 'genesis_site_title', 'custom_site_title' );
+5
source

All Articles