
TheWine theme is our a winery store WordPress Theme which supports WooCommerce plugin as well. By default, it’s header is clean and minimal. In case you want to add my account icon link and/or search box it will require a small code change. Here are all of the necessary steps:
Add Search Box in Header
1.Login to your WordPress Admin Panel
2. Navigate to Left Menu -> Appearance -> Theme File Editor
3. Open header.php file for edit
Above the following code:
<?php if ( tishonator_is_woocommerce_activate() ) :
Insert the following code:
<li>
<div class="widget-area"><div class="widget_search">
<form role="search" method="get" action="<?php echo esc_url( home_url('/') ); ?>" class="search-form">
<input type="search" name="s" class="search-field" placeholder="<?php esc_html_e( 'Search...', 'tishonator' ); ?>" required />
<button type="submit" class="search-submit"><i class="fa fa-search"></i></button>
</form>
</div></div>
</li>
4. Save changes
Add My Account Icon in Header
1.Login to your WordPress Admin Panel
2. Navigate to Left Menu -> Appearance -> Theme File Editor
3. Open header.php file for edit
Above the following code:
<?php if ( tishonator_is_woocommerce_activate() ) :
Insert the following code:
<?php if ( tishonator_is_woocommerce_activate() ) : ?>
<li>
<?php if ( is_user_logged_in() ) { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','tishonator'); ?>"><i class="fa fa-user" aria-hidden="true"></i></a>
<?php }
else { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('Login / Register','tishonator'); ?>"><i class="fa fa-user" aria-hidden="true"></i></a>
<?php } ?>
</li>
<?php endif; ?>
4. Save changes