Add/Remove Elements From The Sidebar Mobile Menu
/**
* Sample function to add/remove items from the sidebar mobile menu
* @link Total/framework/core.php
*/
function my_add_to_mobile_menu( $array ) {
// Add element with ID my-custom-id
$array['my-custom-id'] = '#my-custom-id';
// Remove search
if ( isset( $array['search'] ) ) {
unset($array['search']);
}
// Return items
return $array;
}
add_filter( 'wpex_mobile_menu_source', 'my_add_to_mobile_menu' );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend Code Snippets)