WordPress filter hook · part of WordPress core

nav_menu_item_title

A WordPress core filter that 52 plugins also fire themselves, running on 2.3M+ sites between them.

“Filters a menu item's title.”

How to use nav_menu_item_title

It's a filter: your callback receives the value and 3 more arguments, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'nav_menu_item_title', function( $title, $item, $args, $depth ) {
	// Change $title here.
	return $title;
}, 10, 4 );

Argument names come from ElementsKit Elementor Addons's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

52 plugins that fire nav_menu_item_title

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. ElementsKit Elementor Addons icon ElementsKit Elementor Addons1+ million installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) widgets/nav-menu/nav-menu-walker.php:74
  2. Premium Addons for Elementor icon Premium Addons for Elementor600,000+ installs apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth ) includes/helpers/pa-nav-menu-walker.php:450
  3. Page Builder: Pagelayer icon Page Builder: Pagelayer400,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) main/nav_walker.php:203
  4. Jupiter X Core icon Jupiter X Core70,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/extensions/raven/includes/modules/nav-menu/classes/walker-nav-menu.php:334
  5. Gum Addon for Elementor icon Gum Addon for Elementor50,000+ installs apply_filters( 'nav_menu_item_title', $item->title, $item, $args, $depth ) helper.php:344
  6. Xpro Addons icon Xpro Addons40,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) classes/class-xpro-navwalker.php:269
  7. Apollo13 Framework Extensions icon Apollo13 Framework Extensions20,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) widgets/widget-menu-walker.php:120
  8. Thim Elementor Kit icon Thim Elementor Kit20,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) inc/modules/mega-menu/class-menu-walker.php:158
  9. Animation Addons for Elementor icon Animation Addons for Elementor10,000+ installs apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth ) widgets/nav-menu/walker-nav-menu.php:234
  10. LA-Studio Element Kit for Elementor icon LA-Studio Element Kit for Elementor10,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/class-nav-walker.php:230
  11. Responsive Starter Templates icon Responsive Starter Templates10,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/compatibility/megamenu/class-responsive-legacy-megamenu-nav-walker.php:520
  12. Landing Page Builder icon Landing Page Builder8,000+ installs apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth ) public/templates/widgets/navBuilderMenuWalker.php:144
  13. Themify Builder icon Themify Builder6,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) themify/megamenu/class-mega-menu.php:140
  14. Ultimate Bootstrap Elements for Elementor icon Ultimate Bootstrap Elements for Elementor6,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) inc/walker/bootstrap-nav.class.php:247
  15. Options for Twenty Twenty-One icon Options for Twenty Twenty-One6,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) options-for-twenty-twenty-one.php:4210
  16. EasyMega icon EasyMega5,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) inc/menu.php:326
  17. News Kit Addons For Elementor icon News Kit Addons For Elementor3,000+ installs apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth ) includes/vendors/custom-walker.php:213
  18. RS Template Builder For Elementor icon RS Template Builder For Elementor2,000+ installs apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth ) includes/helpers/class-nav-walker.php:49
  19. Menu In Post icon Menu In Post2,000+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) class-mipwalkernavmenulistbuilder.php:119
  20. MAS Elementor icon MAS Elementor800+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) classes/class-wp-bootstrap-navwalker.php:328
  21. Star Addons for Elementor icon Star Addons for Elementor700+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/class-star-addons-navwalker.php:246
  22. AMP WP icon AMP WP600+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/class-amp-wp-menu-walker.php:275
  23. ST Elementor Addons icon ST Elementor Addons500+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/nav-menu/stea-nav-menu-helper.php:46
  24. Topper Pack icon Topper Pack400+ installs apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth ) includes/mega-menu/init.php:601
  25. Opal Mega Menu icon Opal Mega Menu300+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/class-menu-walker.php:169
  26. STAX Header Builder icon STAX Header Builder200+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) core/helpers/MenuWalker.php:78
  27. Funtionalities for Alpus theme icon Funtionalities for Alpus theme100+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) framework/addons/walker/class-alpus-walker-nav-menu.php:309
  28. TP Flatsome Vertical Menu icon TP Flatsome Vertical Menu100+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) inc/class-tp-vertical-menu-dropdown.php:233
  29. Responsive Mobile Select Menu icon Responsive Mobile Select Menu100+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/class-menu-walker.php:143
  30. Awesome Widgets for Elementor icon Awesome Widgets for Elementor100+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) widgets/awesome-nav-menu/awesome-nav-menu.php:80
  31. MerKit Theme Builder and Template Library for Elementor icon MerKit Theme Builder and Template Library for Elementor60+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/widgets/class-merkit-nav-menu-widget.php:1187
  32. Xolo Addon icon Xolo Addon30+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) inc/erapress/class-wp-bootstrap-navwalker.php:263
  33. Kemet Addons icon Kemet Addons30+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) addons/mega-menu/classes/class-kemet-addon-mega-menu-walker-nav-menu.php:249
  34. Page Load Ajax icon Page Load Ajax20+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) page-load-ajax.php:641
  35. Zyre Elementor Addons icon Zyre Elementor Addons20+ installs apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth ) classes/walker-nav-menu.php:129
  36. Architect icon Architect20+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) widgets/class-archt-menu-walker.php:132
  37. SiteCraft icon SiteCraft10+ installs apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth ) includes/Elementor/Widgets/Nav_Menu/Sc_Menu_Walker.php:238
  38. Octagon Elements for Elementor icon Octagon Elements for Elementor10+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) core/megamenu/class-walker-nav-menu.php:252
  39. Endless Addons icon Endless Addons10+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/class-endless-addons-navwalker.php:246
  40. UNIVERSAM icon UNIVERSAM10+ installs apply_filters( 'nav_menu_item_title', $item->name, $item, $args, $depth ) includes/taxonomy/class-walker-product_category-columns-menu.php:95
  41. UXD Widgets for Elementor icon UXD Widgets for Elementor10+ installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) widgets/sticky-menu-widget.php:1297
  42. DesignSuite icon DesignSuiteFewer than 10 installs apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth ) includes/Elementor/Widgets/Nav_Menu/Ds_Menu_Walker.php:238
  43. Arshida Toolkit for WooCommerce icon Arshida Toolkit for WooCommerceFewer than 10 installs apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth ) src/Menu/MenuWalker.php:176
  44. Wbee Header Footer and Mega Menu Builder for Elementor icon Wbee Header Footer and Mega Menu Builder for ElementorFewer than 10 installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/ThemeBuilder/Nav/Walker.php:115
  45. QuickDocs icon QuickDocsFewer than 10 installs apply_filters( 'nav_menu_item_title', $title, $menu_item, array(), 0 ) src/template-tags.php:293
  46. Fabrement Lite icon Fabrement LiteFewer than 10 installs apply_filters( 'nav_menu_item_title', $title, $item, $args, 0 ) src/Modules/Menu/MenuTree.php:162
  47. Rooster LMS icon Rooster LMSFewer than 10 installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/Elementor/MenuWalker.php:53
  48. Fly Nav Mobile icon Fly Nav MobileFewer than 10 installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) backend/class-fly-nav-mobile-walker.php:86
  49. Apex Addons for Elementor icon Apex Addons for ElementorFewer than 10 installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) widgets/nav-menu-widget.php:1083
  50. Vantorix icon VantorixFewer than 10 installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) inc/helpers/class-nav-walker.php:112
  51. Online Help Sliding Menu icon Online Help Sliding MenuFewer than 10 installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) OHSM_Walker_Nav_menu.php:85
  52. Motto Blocks icon Motto BlocksFewer than 10 installs apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ) includes/classic-menu.php:88

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.