The Nav Menus panel is added at customize_register
action priority 11, so you need to set the priority at priority 12 (or above).
This works for me:
<?php
add_action( 'customize_register', function ( \WP_Customize_Manager $wp_customize ) {
$panel = $wp_customize->get_panel( 'nav_menus' );
if ( $panel ) {
$panel->priority = 1;
}
}, 12 );
Related Posts:
- How do I implement selective refresh with a customizer setting?
- How to create a theme customizer ‘sub’ panel?
- Use default value of wp_customizer in theme_mod output?
- How to upload multiple images with WP_Customize_Media_Control
- Is there any way to add placeholder for WordPress Customizer text input fields
- Custom editable content for front page from Theme Customizer
- Add/remove controls dynamically based on other settings in Customizer
- Add custom background to div in home page
- How do I handle the “WP_Customize_Cropped_Image_Control” callback?
- How to mix partial and full page refresh in the same section of the customizer?
- Add a “loading” notice when Customizer is making changes
- Make Theme Options Native to Theme Customizer
- Internalize get_theme_mod CSS Into Stylesheet?
- How to get control choices from $setting object passed to sanitize_callback
- Can I change a control’s transport in Customizer depending on the previewed page?
- Get attachment id from WP Customizer
- How to output WP_Customize_Cropped_Image_Control setting?
- How to hook on customizer section expanded/active/opened event?
- Need to run a plugin on Customize.php
- Customizer preview doesn’t update get_option() value properly
- How to hide few theme customization options – TwentySeventeen theme
- Panel description in Customizer does not show up
- How to extend Customizer payload sent when ‘Save & Publish’ is triggered
- Does the customizer support multiple templates?
- How can a default site icon be set in customizer?
- New customizer setting not showing value
- Removing pre existing menu item
- Customizer Add Section argument ‘active_callback’ => “is_front_page” not working
- get_theme_mod() only working when the customizer is open
- Change the location of add_theme_support( ‘custom-header’ ) in the customizer
- Customizer: Update Preview instantly when typing into a number input field
- making customizer sections sortable but items not getting sorted first time items are moved
- How do I add a customizer control dynamically?
- Can i use the same sanitize function on multiple theme mod textboxes?
- Need a help on sanitization
- Make customizer controls get custom setting type value
- Background Color not being set in WP Customizer
- How to disable cropping of the site icon?
- How do I update the wpColorPicker palette after initialization?
- How to Get WP_Customize_Image_Control content?
- Selective refresh and registering widget areas
- How to use Vuejs inside a custom control?
- Your theme has 1 widget areas, but this particular page doesn’t display them in wordpress
- Creating Dependant Text field in Customizer with Checkbox
- Binding Serialized Setting to JS for Realtime Response
- Unset color set in Theme Customizer
- Add post type titles in customizer dropdown list
- How to make a Customizer partial force full refresh instantly?
- get_theme_mod filter ignores sanitize_callback
- DIVI Theme customizer changes not applied on existing pages [closed]
- Setting dirty on customizer
- Customiser sections not being displayed with `active_callback`
- Trouble creating custom sanitization function for user list dropdown
- Output foreach loop used in WordPress wp_customize
- Changing Customizer Select To Checbox, But Retaining Classes
- Override theme style rule in Gutenberg
- Customizer related question
- Theme Check plugin error when I add ‘©’ [closed]
- Theme Customize API Panel Concept
- Add Links to Customizer
- Detect device change (desktop, tablet or mobile) in Customizer
- Kirki: generate toggles for each taxonomy term
- Custom Customizer setting only saving value of 0
- How to make WordPress customizer to autoload changes?
- When deleting a theme, are the theme customizer settings also deleted from the database?
- How to Add new Arguments to custom Control of customizer wordpress?
- where to change text for header?
- Theme Customizer for only author.php (per user baisi)
- Customizer API – Class doesn’t exist error
- Get register wp_customize settings in the front end
- Customizer List of Items
- Prevent WordPress from setting src on image added in Customiser
- Theme Customizer performance drops when adding a lot of settings
- How to Add Extra Settings to Appearance/Customizer Sections homepage
- Sanitize callback function for select controll in customizer
- Defining path of content folder in WP-config solves the issue of missing header, footer, theme options. Is this a good approach? Expert Advice needed
- Creating a WordPress Customizer control/field with react
- What is the method to switch to specific page on entering theme customizer screen?
- How to Display Error in my WordPress customizer API?
- Change a customizer control based on another control’s value dynamically
- Unable to Auto Post In Buddy Press Activity from Elementor-Pro Form
- Linking to a Customizer control
- How to add a link to an external website in the description of a customizer control (with Kirki)?
- Using different header images for different devices
- Can you make sub-panels in customizer?
- WordPress Customizer not allowing menu options
- “Display Site Title and Tagline” checkbox without adding Header Image option
- WordPress Theme Customization error
- Customizer Get Control Choices on Change
- How can I stop widgets from re-executing every time I access the logged-in homepage?
- How to implement Selective Refresh within posts?
- Why my first new WP_Customize_Image_Control doesn’t work
- Theme customizer API get functions
- how to make additional color options added to default color Customizer save their value
- Template tags not working in the customizer preview
- Return customizer setting value in functions.php
- HTML inside Customizer
- Disabling and enabling content using Customizer
- I am looking for a font used in WordPress [closed]
- What is the section ID (name) for “Menus” in the Customizer?