Editing handheld footer middle button and/or button order
-
I want my handheld footer to display “my-account”, “home” and “cart” in that exact order. When I used some code snippets (found here: https://docs.woocommerce.com/document/customize-the-links-in-the-handheld-footer-bar/) to remove my search button and insert a home button, I was stuck with the “home” – “my-account” – “cart” order. So I thought about removing “my-account” too and reinserting it with the snipped I used to add “home”, but I have no idea how to edit said snippet to link to the “my-account” page. I’ve been looking for documentation of the used tags and the tags I need all day, but there is none to be found. What the hell is “jk_add_home_link” even and where do I find more stuff like this? I don’t even know what part of wordpress “jk_” is supposed to refer to.
Anyway, I’d like to know how I can add other buttons besides “home”, alternatively, how I could replace the middle “search” button with “jk_home_link”, whatever that may be, and perhaps where the hell these tags are documented and where the base code that creates the handheld footer even is.
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'] ); 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' => 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>'; }
The page I need help with: [log in to see the link]
- The topic ‘Editing handheld footer middle button and/or button order’ is closed to new replies.