• Hi,
    I need to add custom element to mobile nav, just like cart icon (no in hamburger menu).
    How can i do it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author David Vongries

    (@davidvongries)

    Hi @ownyou,

    You can add a custom element next to the hamburger icon like this:

    
    /**
     * Add cart menu item to mobile navigation.
     */
    function prefix_your_function() {
    
    	// Construct.
    	$menu_item  = '<ul class="wpbf-mobile-nav-item">';
    	$menu_item .= '' // your custom content goes here.
    	$menu_item .= '</ul>';
    
    	echo $menu_item;
    
    }
    add_action( 'wpbf_before_mobile_toggle', 'prefix_your_function' );

    the part saying

    (no in hamburger menu)

    confuses me a little so I’m not sure if that’s what you’re looking for.

    The code above goes into your child-theme’s functions.php ??

    Hope that helps!

    Best,
    David

    Thread Starter OwnYou

    (@ownyou)

    I mean making a tab my account with an icon next to the cart

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘custom element in mobile nav’ is closed to new replies.