Reply To: Adding New Message to Mobile Menu


Home Forums Front End PM PRO Adding New Message to Mobile Menu Reply To: Adding New Message to Mobile Menu

#24691
shamim
Keymaster

If we know menu slug then we can use that. use like following (change MENU_SLUG with your menu slug)

add_filter( 'wp_nav_menu_MENU_SLUG_items', function( $items, $args ) {
    $items .= '<li><a href="'. fep_query_url( 'messagebox' ) .'">' . sprintf(__('Message Box%s', 'front-end-pm'), fep_get_new_message_button() ) . '</a></li>';
    return $items;
}, 99, 2);