Tag line under logo
-
Hey guys
I would like to add the tag line under the logo for my wife’s site. I have tried various ides found online with no luck. is there anything specific to chiro pro to do this?
her site is https://shoretherapyservices.com/
thanks!
-
Hello there,
This task requires to edit theme’s header.php file but we don’t recommend to edit main theme files directly.
The best way to make changes like this to a theme is to use a child theme, so your tweaks won’t be overwritten when updating the theme.After making a child theme create a header.php file here and copy the below code.
After that your site’s tagline will show under the logo area.<!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" > <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <div id="wrapper1"> <div id="container1"> <header> <div id="logo"> <?php if ( get_theme_mod('logo' , get_template_directory_uri() . '/images/logo.png') ) { ?> <a href="<?php echo esc_url(home_url('/')); ?>"><img src="<?php echo esc_url(get_theme_mod('logo' , get_template_directory_uri() . '/images/logo.png')); ?>" alt="logo"></a> <div id="description-text"> <a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo ( 'description'); ?></a> </div> <?php } else { ?> <div class="site-info-text"> <div id="title-text"> <a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo( 'name'); ?></a> </div> <div id="description-text"> <a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo ( 'description'); ?></a> </div> </div> <?php }?> </div> <div class="info-box" id="address"> <h4><?php _e('ADDRESS' , 'chiro-pro'); ?></h4> <p><?php echo esc_html(get_theme_mod('street' , '500 Cherry St.')); ?><br><?php echo esc_html(get_theme_mod('city_state_zip' , 'Sacramento, CA 95661')); ?></p> </div> <div class="info-box" id="your-email"> <h4><?php _e('EMAIL' , 'chiro-pro'); ?></h4> <p><a href="mailto:<?php echo is_email(get_theme_mod('email' , '[email protected]')); ?>"><?php echo is_email(get_theme_mod('email' , '[email protected]')); ?></a></p> </div> <div class="info-box" id="phone"> <h4><?php _e('PHONE' , 'chiro-pro'); ?></h4> <p><a href="tel:<?php echo esc_attr(get_theme_mod('phone_link' , '5555555555')); ?>"><?php echo esc_html(get_theme_mod('phone' , '555-555-5555')); ?></a></p> </div> </header> <?php wp_nav_menu(array('theme_location' => 'mainnav', 'container_id' => 'main-navigation', 'menu_id' => 'nav', 'fallback_cb' => 'chiropro_default_menu')); ?> </div> </div>
Hope it helps and let me know if you require any further assistance.
Poonam,
Thank you for that. It worked on all pages but the home page! Any reason you think/
why that would be? It also shows up underlined. Is there a way to remove the underline?
Thanks again!
Hello,
To remove the underline add the following custom CSS to customize-> Additional CSS
div#description-text a { text-decoration: none; }
Your theme has a separate header file for the front page. To get the tagline on front page just go to your child theme folder create a file header-frontpage.php and paste the below code.
<!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" > <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <div id="wrapper3"> <div id="container1"> <header> <div id="logo"> <?php if ( get_theme_mod('logo' , get_template_directory_uri() . '/images/logo.png') ) { ?> <a href="<?php echo esc_url(home_url('/')); ?>"><img src="<?php echo esc_url(get_theme_mod('logo' , get_template_directory_uri() . '/images/logo.png')); ?>" alt="logo"></a> <div id="description-text"> <a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo ( 'description'); ?></a> </div> <?php } else { ?> <div class="site-info-text"> <div id="title-text"> <a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo( 'name'); ?></a> </div> <div id="description-text"> <a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo ( 'description'); ?></a> </div> </div> <?php }?> </div> <div class="info-box" id="address"> <h4><?php _e('ADDRESS' , 'chiro-pro'); ?></h4> <p><?php echo esc_html(get_theme_mod('street' , '500 Cherry St.')); ?><br><?php echo esc_html(get_theme_mod('city_state_zip' , 'Sacramento, CA 95661')); ?></p> </div> <div class="info-box" id="your-email"> <h4><?php _e('EMAIL' , 'chiro-pro'); ?></h4> <p><a href="mailto:<?php echo is_email(get_theme_mod('email' , '[email protected]')); ?>"><?php echo esc_html(get_theme_mod('email' , '[email protected]')); ?></a></p> </div> <div class="info-box" id="phone"> <h4><?php _e('PHONE' , 'chiro-pro'); ?></h4> <p><a href="tel:<?php echo esc_html(get_theme_mod('phone_link' , '5555555555')); ?>"><?php echo esc_html(get_theme_mod('phone' , '555-555-5555')); ?></a></p> </div> </header> <?php wp_nav_menu(array('theme_location' => 'mainnav', 'container_id' => 'main-navigation', 'menu_id' => 'nav', 'fallback_cb' => 'chiropro_default_menu')); ?>
Let me know if you need help with anything else!
Thanks! I will try I a bit
OK. I uploaded that file and no luck. No rush but next time you get a minute can you check it?
Thanks
This will work for sure. Don’t upload from the main theme. Create a new file named
header-frontpage.php
and copy the above code.got it! Thanks so much!
Glad I could help ?? I would love if you would mark this topic as resolved in the left hand sidebar.
Done!
- The topic ‘Tag line under logo’ is closed to new replies.