user6738171
user6738171

Reputation: 1007

Changing header from a logo img to site title

I am trying to change my site header logo from an img to my site name (it would just take my site name from Wordpress settings). I can't figure out how to change this, and I feel like it is just a simple fix. Does anyone have any solutions?

inc/header/style5.php

<?php 
	$header_color = ot_get_option('header_color', 'light');
?>
<!-- Start Header -->
<header class="header style5 <?php echo esc_attr($header_color); ?>" role="banner">
	<div class="row">
		<div class="small-2 columns text-left mobile-icon-holder">
			<a href="#" data-target="open-menu" class="mobile-toggle"><i class="fa fa-bars"></i></a>
		</div>
		<div class="small-8 large-12 columns logo">
			<div id="menu_width">
				<?php if (ot_get_option('thb_logo')) { $logo = ot_get_option('thb_logo'); } else { $logo = THB_THEME_ROOT. '/assets/img/logo.png'; } ?>
				<a href="<?php echo esc_url(home_url('/')); ?>" class="logolink">
					<img src="<?php echo esc_url($logo); ?>" class="logoimg" alt="<?php bloginfo('name'); ?>"/>
				</a>
				<nav class="menu-holder">
					<?php if (has_nav_menu('nav-menu')) { ?>
					  <?php wp_nav_menu( array( 'theme_location' => 'nav-menu', 'depth' => 3, 'container' => false, 'menu_class' => 'sf-menu style3', 'walker' => new thb_MegaMenu_tagandcat_Walker ) ); ?>
					<?php } else if ( current_user_can( 'edit_theme_options' ) ) { ?>
					    <ul class="sf-menu style3">
					        <li><a href="<?php echo esc_url( admin_url( 'nav-menus.php' ) ); ?>"><?php esc_html_e( 'Please assign a menu', 'goodlife' ); ?></a></li>
					    </ul>
					<?php } ?>
				</nav>
				<?php do_action( 'thb_secondary'); ?>
			</div>
		</div>
		<div class="small-2 columns text-right mobile-share-holder">
			<div>
			<?php do_action( 'thb_quick_search' ); ?>
			</div>
		</div>
	</div>
</header>
<!-- End Header -->

And I think the only part of this code I have to edit is this little section? I just can't figure out how to edit it correctly.

				<?php if (ot_get_option('thb_logo')) { $logo = ot_get_option('thb_logo'); } else { $logo = THB_THEME_ROOT. '/assets/img/logo.png'; } ?>
				<a href="<?php echo esc_url(home_url('/')); ?>" class="logolink">
					<img src="<?php echo esc_url($logo); ?>" class="logoimg" alt="<?php bloginfo('name'); ?>"/>
				</a>

Upvotes: 0

Views: 217

Answers (1)

Peter Featherstone
Peter Featherstone

Reputation: 8102

It looks like you just need to change:

<img src="<?php echo esc_url($logo); ?>" class="logoimg" alt="<?php bloginfo('name'); ?>"/>

to simply:

<?php bloginfo('name'); ?>

Upvotes: 1

Related Questions