Change text header to customized logo
-
Hello, Thank you for this amazing theme!
I’m a fresher to wordpress, recently I’m using it to help my friend to build her first website, I try to put a logo to replace the text on the left top, I didn’t find the option in my Appearance menu or in the customized menu, so I tried several plugins, but the code they provide doesn’t match what I find in the header.php file.I find the code to control the specific header I want to change is as below, Hope some one could help me. I want to change the text at top-left of home page into the brand’s logo.
here is the code I find:
<?php
if ( ( of_get_option( ‘header_title_text’, ‘1’ ) && of_get_default( ‘header_title_text’ ) ) || get_theme_mod( ‘logo’ ) ) {
echo ‘<h1 class=”site-title”‘;
if ( of_get_option( ‘header_title_size’, ” ) ) {
echo ‘ style=”font-size: ‘ . of_get_option( ‘header_title_size’) . ‘rem;”‘;
}
echo ‘>’;
if ( get_theme_mod( ‘logo’ ) ) {
echo ‘<img src=”‘ . esc_url( get_theme_mod( ‘logo’ ) ) . ‘” alt=”‘ . get_bloginfo( ‘name’ ) . ‘” />’;
} else {
if ( of_get_option( ‘header_title_text’, ” ) || of_get_default( ‘header_title_text’ ) ) {
echo of_get_option( ‘header_title_text’ , of_get_default( ‘header_title_text’ ) );
}
}
echo ‘</h1>’;Thank you so much!
- The topic ‘Change text header to customized logo’ is closed to new replies.