How to access the nav_menus panel with the customizer api?

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 );

Leave a Comment

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