Handheld menu Search doesn’t work
-
Dear…
I’ve been try to add snippet to change the custom order of handheld menu, but when the search callback i’ve some problem.. This is the code :
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; } add_filter( 'storefront_handheld_footer_bar_links', 'jk_add_home_link' ); function jk_add_home_link( $links ) { $new_links = array( 'home' => array( 'priority' => 20, 'callback' => 'jk_home_link', ), 'search' => array( 'priority' => 30, 'callback' => 'storefront_handheld_footer_bar_search_link', ), 'my-account' => array( 'priority' => 40, 'callback' => 'storefront_handheld_footer_bar_account_link', ), ); $links = array_merge( $new_links, $links ); return $links; } function jk_home_link() { echo '<a href="' . esc_url( home_url( '/' ) ) . '">' . __( 'Home' ) . '</a>'; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Handheld menu Search doesn’t work’ is closed to new replies.
