Hide a menu (navigation bar) on all posts

if you want to hide the top bar menu then you can check it on wordpress.org they alreay provide the full solution. you can put this in your custom css. if you do not know where to add custom CSS then go to theme customization inside the appearance and you can easily access custom CSS. … Read more

Menu Items disappearing/being empty on save or post edit

i got the same problems several times ago, and it’s caused by file permission in linux. for make sure about the problems, would you like to show us about the errors by adding below code in your wp-config.php define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_LOG’, true ); define( ‘WP_DEBUG_DISPLAY’, true ); be better if you give … Read more

Add div content to my already existing menu

So your links are all set static? If I don’t miss something badly then why do you need the wp_nav_menu-function then at all. You code could look like so: <div class=”menujeu”> <div class=”dropdown”> <button class=”dropbtn”>HACK & SLASH <i class=”fa fa-caret-down”></i> </button> <div class=”dropdown-content”> <a href=”https://www.dm-gaming.eu/chronicon/”>Chronicon</a> <a href=”https://www.dm-gaming.eu/diablo-iii/”>Diablo 3</a> <a href=”https://www.dm-gaming.eu/diablo-4/”>Diablo 4</a> <a href=”https://www.dm-gaming.eu/dreamscaper/”>DreamScaper</a> <a href=”https://www.dm-gaming.eu/grim-dawn/”>Grim … Read more

Why nav_menu_css_class doesn’t work with apply_filters?

Because that’s not what apply_filters() does. You’ll even see the usage guide and examples at your link all use add_filter(). Also see the official docs on Filters. Using apply_filters() makes a value filterable. add_filter() is used to filter a filterable value by passing a function that does the filtering. WordPress uses apply_filters(‘nav_menu_css_class’, …, which allows … Read more

Get Each Menu Nav Label of Menus in HTML tag

Add This code in functions.php file class WP_Custom_Nav_Walker extends Walker_Nav_Menu { public function start_el(&$output, $item, $depth = 0, $args = array (), $id = 0) { $indent = ( $depth ) ? str_repeat ( “\t”, $depth ) : ”; $classes = empty ( $item->classes ) ? array () : (array) $item->classes; $classes[] = ‘menu-item-‘ . … Read more