Alter the Hamburger "bars" Icon In The Mobile Menu Link
This is a Developer Level doc.
If you're unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from a professional. Under our Support Policy, we don't provide support for modifications and customization.
If you wish to change/alter the Hamburger "bars" icon in the Mobile Menu, use the following PHP snippet:
function my_mobile_menu_open_button_icon( $return ) { return '<i class="YOUR CUSTOM ICON"></i>'; } add_filter( 'ocean_mobile_menu_navbar_open_icon', 'my_mobile_menu_open_button_icon' );
Replace YOUR CUSTOM ICON
with the actual icon class* you wish to use. For example, if you wish to use the Bell Icon, you need to enter fas fa-bell
, therefore the correct code would be:
function my_mobile_menu_open_button_icon( $return ) { return '<i class="fas fa-bell"></i>'; } add_filter( 'ocean_mobile_menu_navbar_open_icon', 'my_mobile_menu_open_button_icon' );
All PHP snippets should be added via a child theme's functions.php file.
*Pay attention to the actual icons you are using within your theme, because FA 4 and FA 5 have different classes.
**Since the theme 1.7.1 version, and the Ocean Extra plugin 1.5.17 version, OceanWP has switched to Font Awesome 5.