Skip to content

Instantly share code, notes, and snippets.

@akther80
Created July 1, 2019 07:48
Show Gist options
  • Save akther80/76d510df8d79988084c1cafcb8b895c2 to your computer and use it in GitHub Desktop.
Save akther80/76d510df8d79988084c1cafcb8b895c2 to your computer and use it in GitHub Desktop.
Electro v2 - Add custom code between logo and search field
add_action( 'init', 'ec_child_add_custom_code_after_header_logo' );
function ec_child_add_custom_code_after_header_logo() {
add_action( 'electro_masthead', 'electro_header_custom_code', 15 );
}
if ( ! function_exists( 'electro_header_custom_code' ) ) {
function electro_header_custom_code() {
?>
<ul class="list-unstyled header-custom-support-links">
<li><a href="#"><i class="ec ec-shopping-bag"></i><?php echo esc_html('99 88 888 888' , 'electro'); ?></a></li>
<li><a href="#"><i class="ec ec-transport"></i><?php echo esc_html('[email protected]' , 'electro'); ?></a></li>
<li><a href="#"><i class="ec ec-map-pointer"></i><?php echo esc_html('Store Locator' , 'electro'); ?></a></li>
</ul>
<?php
}
}
.header-custom-support-links i {
margin-right: 5px;
}
.header-custom-support-links a {
color: #333e48;
font-weight: 700;
}
.header-custom-support-links {
margin-bottom: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment