Last active
April 27, 2021 22:39
-
-
Save jameskoster/8524698767ad72ee878048296c048b65 to your computer and use it in GitHub Desktop.
Storefront add a link to the handheld nav bar
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>'; | |
} |
@Ricardords: github doesn't do @tags in gist, but if you come back to this thread.....
You'll want to properly edit line 16 to reflect your domain, and/or if you'd like it to open in a new tab, be sure to append it with
target="_blank"
How do I add a third party widget in the handheld navigation bar?
Good day, How do I add 2 new button to the nav bar on the bottom? tried many different things but to no avail...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
James, how could I add a link to a page outside of my domain? Thanks!