Skip to main content
Login Join
Snippet · JavaScript

Add Custom Admin Command Palette Link

Shared by Darshit Rajyaguru · June 15, 2026 · @admin_footer

6 views
Back to Snippets

Adds a custom command to WordPress admin Command Palette allowing quick navigation.

wp.domReady(function(){
    if ( ! wp.commands ) {
        return;
    }

    wp.commands.registerCommand(
        'custom/open-settings',
        {
            label: 'Open Theme Settings',
            callback() {
                window.location.href =
                'themes.php';
            }
        }
    );
});