Any way to use classic Menus in Full Site Editing?

Is there any way to enable the Appearance->Menus in the admin dashboard while FSE theme is enabled I noticed that in some FSE themes the classic Menus admin page shows up under Appearance: when they include a register_nav_menus( … ) call within the after_setup_theme hook to define the relevant classic menu locations. See for example … Read more

Add A Menu Item To A WP_Nav_Menu Navigation via PHP Function

You can use wp_update_nav_menu_item() to programmatically add a new menu item to the database. Since this change persists, you shouldn’t execute this functionality on every page – it’s best used as a one-off (though in that case it might be easier and more efficient to use WP CLI as suggested by WebElaine in the comments), … Read more

Adding padding above menu

This forum is specific to WordPress internal workaround and your question is regarding element styling which does not belong here. Please try to use specific sites according to your question. For your problem, add the following lines in your theme’s stylesheet and it should be fixed. #masthead #cms-header.header-ontop { padding-top:15px; } #masthead #cms-header.header-sticky { padding-top:0; … Read more

Custom div to to menu wordpress afte

As toscho mentioned this can be done with the items_wrap argument. It would be something like this: ‘items_wrap’ => ‘<ul id=”%1$s”>%3$s</ul><div id=”MYDIV”></div>’ For more info see here.

Theme supports only one menu. I need to add more – but how? [closed]

You need to add a new menu here: function register_nisarg_menus() { // This theme uses wp_nav_menu() in one location. register_nav_menus( array( ‘primary’ => esc_html__( ‘Top Primary Menu’, ‘nisarg’ ), ‘my_new_menu’ => esc_html__( ‘My New Menu’, ‘nisarg’ ) //this is the new line ) ); } and you use it like this in your HTML code … Read more

How does WP knows which template to use for a page

The native logic of template choice is contained in file aptly named template-loader.php. It processes the current context and calls respective get_*_template() functions, until a match is found. This process results in what is called Template Hierarchy. However as it was pointed out this only covers native core logic. Plugins can wildly customize this process … Read more

Two Homes In Navigation Menu

This sounds like the same problem I had, WordPress added a home option to the menu without it being added in the appearance menu items so I could not remove it. I googled for ages and found two solutions. Neither of them worked but if I combined the two they did. Open the functions.php file … Read more

The menu jumps a few pixels after the website loads

I like to call that “Fix it with JavaScript” aka “Fix it in post“. It happens when a someone can’t do something with CSS so they resort to JS. On a slow-loading site, such as the one you linked, the time it takes to load the JS is long enough so that any corrections to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)