Skip to content

Instantly share code, notes, and snippets.

@jameskoster
Last active April 27, 2021 22:39
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jameskoster/8524698767ad72ee878048296c048b65 to your computer and use it in GitHub Desktop.
Storefront add a link to the handheld nav bar
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>';
}
@Miyagi-karate
Copy link

James, how could I add a link to a page outside of my domain? Thanks!

@BurlesonBrad
Copy link

@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"

@rahulbroy
Copy link

How do I add a third party widget in the handheld navigation bar?

@brynjonesmm
Copy link

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