Render link description in navigation block

I solve this problem by using WordPress Filter hooks I use the filter render_block, to hook in altering the existing HTML So I created custom_render_block_core_navigation_submenu hook function. Inside my hook I am using conditions to avoid storing my modified code in the database. Target the type of block (core/navigation-submenu) Only render in the front-end Don’t alter … Read more

Show a text in menu

You used the correct filter, but the reason it isn’t showing has nothing to do with menus, and everything to do with the basics of how filters work. That filter gives a string and expects a string in return, so if we add type hints the problem becomes much more obvious: function add_search( string $items, … Read more

Show shortcode output in menu

Please add below line in your functions.php file add_filter(‘wp_nav_menu_items’, ‘do_shortcode’); This line will execute do_shortcode to your menu items and if there is any it will execute the shortcode.

Main Menu Hover is Always White

Looks like Elementor is setting the hover color for all links on the page to #5E6462, which is hard to read against the background color of the nav menu. Somewhere within Elementor the color is being set; that will need to be changed.

register_nav_menus() not registering

Perhaps it’s happening too early and getting stomped on later. Try doing it the traditional way, in an init hook callback, like so: function register_my_menu() { register_nav_menus([ ‘main-menu’ => esc_html__(‘Main Menu’, ‘myfirsttheme’), ]); } add_action( ‘init’, ‘register_my_menu’ );