Skip to content

Instantly share code, notes, and snippets.

@jmabbas
Last active January 26, 2019 17:44
Show Gist options
  • Save jmabbas/cc31bd4a414cd24820a6cce4e864b992 to your computer and use it in GitHub Desktop.
Save jmabbas/cc31bd4a414cd24820a6cce4e864b992 to your computer and use it in GitHub Desktop.
Electro Header compare Icon to My account icon replacement
add_action('wp_loaded', 'el_custom_wp_loaded');
function el_custom_wp_loaded() {
remove_action( 'electro_navbar', 'electro_navbar_compare', 50 );
}
add_action( 'electro_navbar', 'electro_navbar_account', 50 );
if ( ! function_exists( 'electro_navbar_account' ) ) {
/**
* Displays a link to account page in navbar
*/
function electro_navbar_account() {
if ( is_woocommerce_activated() ) {
?>
<ul class="navbar-account nav navbar-nav pull-right flip">
<li class="nav-item">
<a href="<?php echo esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) ?>" class="nav-link">
<i class="ec ec-user"></i>
</a>
</li>
</ul>
<?php
}
}
}
.navbar-account i.ec{
line-height: .9em;
font-size: 1.429em;
}
.navbar-primary ul.navbar-account.nav.navbar-nav {
margin-left: 0px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment