Skip to content

Instantly share code, notes, and snippets.

@mfields
Created February 21, 2014 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfields/9140890 to your computer and use it in GitHub Desktop.
Save mfields/9140890 to your computer and use it in GitHub Desktop.
Portfolio Press: customizer.js
( function( $ ) {
var $title = $( '#site-title a' ),
$tagline = $( '#site-description' ),
$branding = $( '#branding' );
/* Title Text */
wp.customize( 'blogname', function( value ) {
value.bind( function( to ) {
$title.text( to );
} );
} );
/* Tagline Text */
wp.customize( 'blogdescription', function( value ) {
value.bind( function( to ) {
$tagline.text( to );
} );
} );
/* Header Background Color */
wp.customize( 'portfoliopress[header_color]', function( value ) {
value.bind( function( to ) {
$branding.css( 'background-color', to );
} );
} );
} )( jQuery );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment