Customizing the links in the handheld footer bar is fairly straightforward and handled via the storefront_handheld_footer_bar_links
filter.
Note: This is a Developer level doc. If you are unfamiliar with code and resolving potential conflicts, select a WooExpert or Developer for assistance. We are unable to provide support for customizations under our Support Policy.
Removing a link
↑ Back to top
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'storefront_handheld_footer_bar_links', 'jk_remove_handheld_footer_links' ); | |
function jk_remove_handheld_footer_links( $links ) { | |
unset( $links['my-account'] ); | |
unset( $links['search'] ); | |
unset( $links['cart'] ); | |
return $links; | |
} |
Removing all links
↑ Back to top
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'init', 'jk_remove_storefront_handheld_footer_bar' ); | |
function jk_remove_storefront_handheld_footer_bar() { | |
remove_action( 'storefront_footer', 'storefront_handheld_footer_bar', 999 ); | |
} |
Adding a link
↑ Back to top
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'storefront_handheld_footer_bar_links', 'jk_add_home_link' ); | |
function jk_add_home_link( $links ) { | |
$new_links = array( | |
'home' => array( | |
'priority' => 10, | |
'callback' => 'jk_home_link', | |
), | |
); | |
$links = array_merge( $new_links, $links ); | |
return $links; | |
} | |
function jk_home_link() { | |
echo '<a href="' . esc_url( home_url( '/' ) ) . '">' . __( 'Home' ) . '</a>'; | |
} |
- Find the icon you want to use on the FontAwesome site and locate its unicode value. In this case we’ll use the home icon which has a unicode value of
f015
. - Here’s the CSS you need for the home link we created.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.storefront-handheld-footer-bar ul li.home > a:before { | |
content: "\f015"; | |
} |