generate_menu_bar_items

The generate_menu_bar_items hook allows you to hook non-menu item elements such as buttons, icons and whatever else your design requires. Content added there will automatically display in the navigation and mobile header.

Using a Hook Element

If you have GP Premium, you can use a hook element and add the content like this:

<span class="menu-bar-item">
    <a href="#">Your icon HTML</a>
</span>

Using a Function

If you are using the free GeneratePress theme, you can use the PHP snippet method:

add_action( 'generate_menu_bar_items', function() {
    ?>
        <span class="menu-bar-item">
            <a href="#">Your icon HTML</a>
        </span>
    <?php
} );