Skip to content

Instantly share code, notes, and snippets.

@DxDiagDx
Created April 20, 2020 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DxDiagDx/488a317b46649f0b52ccdfe317371879 to your computer and use it in GitHub Desktop.
Save DxDiagDx/488a317b46649f0b52ccdfe317371879 to your computer and use it in GitHub Desktop.
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