Title: wp_customize_url
Published: April 25, 2014
Last modified: February 24, 2026

---

# wp_customize_url( string $stylesheet ): string

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#wp--skip-link--target)

Returns a URL to load the Customizer.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#parameters)󠁿

 `$stylesheet`stringoptional

Theme to customize. Defaults to active theme.
 The theme’s stylesheet will be urlencoded
if necessary.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#return)󠁿

 string

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#source)󠁿

    ```php
    function wp_customize_url( $stylesheet = '' ) {
    	$url = admin_url( 'customize.php' );
    	if ( $stylesheet ) {
    		$url = add_query_arg( 'theme', urlencode( $stylesheet ), $url );
    	}
    	return esc_url( $url );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/theme.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/theme.php#L3783)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/theme.php#L3783-L3789)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#related)󠁿

| Uses | Description | 
| [esc_url()](https://developer.wordpress.org/reference/functions/esc_url/)`wp-includes/formatting.php` |

Checks and cleans a URL.

  | 
| [add_query_arg()](https://developer.wordpress.org/reference/functions/add_query_arg/)`wp-includes/functions.php` |

Retrieves a modified URL query string.

  | 
| [admin_url()](https://developer.wordpress.org/reference/functions/admin_url/)`wp-includes/link-template.php` |

Retrieves the URL to the admin area for the current site.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#)

| Used by | Description | 
| [wp_ajax_install_theme()](https://developer.wordpress.org/reference/functions/wp_ajax_install_theme/)`wp-admin/includes/ajax-actions.php` |

Handles installing a theme via AJAX.

  | 
| [wp_admin_bar_customize_menu()](https://developer.wordpress.org/reference/functions/wp_admin_bar_customize_menu/)`wp-includes/admin-bar.php` |

Adds the “Customize” link to the Toolbar.

  | 
| [wp_prepare_themes_for_js()](https://developer.wordpress.org/reference/functions/wp_prepare_themes_for_js/)`wp-admin/includes/theme.php` |

Prepares themes for JavaScript.

  | 
| [wp_welcome_panel()](https://developer.wordpress.org/reference/functions/wp_welcome_panel/)`wp-admin/includes/dashboard.php` |

Displays a welcome panel to introduce users to WordPress.

  | 
| [WP_Themes_List_Table::display_rows()](https://developer.wordpress.org/reference/classes/wp_themes_list_table/display_rows/)`wp-admin/includes/class-wp-themes-list-table.php` |

Generates the list table rows.

  | 
| [wp_ajax_query_themes()](https://developer.wordpress.org/reference/functions/wp_ajax_query_themes/)`wp-admin/includes/ajax-actions.php` |

Handles getting themes from [themes_api()](https://developer.wordpress.org/reference/functions/themes_api/) via AJAX.

  | 
| [WP_Customize_Manager::wp_die()](https://developer.wordpress.org/reference/classes/wp_customize_manager/wp_die/)`wp-includes/class-wp-customize-manager.php` |

Custom wp_die wrapper. Returns either the standard message for UI or the Ajax message.

  |

[Show 2 more](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_customize_url/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.4.0](https://developer.wordpress.org/reference/since/3.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_customize_url%2F)
before being able to contribute a note or feedback.