Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Storefront: добавить ссылку в футер-бар
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>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment