Adding text to WooCommerce handheld menus
-
There is great documentation on how to change or remove the handheld menu links in WooCommerce available. However, I have noticed that many mobile designs (mweb and apps) are trending towards showing text as well as icons for handheld menus. I want to display the text for the link UNDERNEATH the icon, as well as the icon itself.
It looks like WooCommerce has intentionally hidden the text for the handheld link using CSS:
.storefront-handheld-footer-bar ul li>a { height: 4.235801032em; display: block; position: relative; text-indent: -9999px; z-index: 999; border-right: 1px solid rgba(255, 255, 255, .2) }
My suspicion was that I should just change the text-indent and the text will show back up. For example, in the instructions provided by WooCommerce to add a new home link to the handheld menu, my thought was that changing text-indent in the CSS would allow me to display both the icon and ‘Home’.
function jk_home_link() { echo '<a href="' . esc_url( home_url( '/' ) ) . '">' . __( 'Home' ) . '</a>'; }
But, I can’t quite figure out how to “undo” the text-indent so that the text for the link shows as well. Any thoughts?
- The topic ‘Adding text to WooCommerce handheld menus’ is closed to new replies.