Skip to content

Instantly share code, notes, and snippets.

@caleywoods
Last active February 2, 2017 00:05
Show Gist options
  • Save caleywoods/f0da6a4a878bdb945a1566ae8aab553c to your computer and use it in GitHub Desktop.
Save caleywoods/f0da6a4a878bdb945a1566ae8aab553c to your computer and use it in GitHub Desktop.

Place this in functions.php of your theme or somewhere else it can be called. This adds a link to the WP Admin bar that will deep link you to edit a particular section of the theme customizer in the admin backend.

You can read more about this here

The trick is to link to /customize.php?autofocus[section]={your_section_here}. Some section names in default WP are:

  • title_tagline (For Site Identity)
  • colors (For colors)
  • background_image (For Background Image)

So if you wanted to deep link to editing the site identity it would look like:

'href' => get_admin_url() . '/customize.php?autofocus[section]=title_tagline'

Example Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment