Skip to content

Instantly share code, notes, and snippets.

@JiveDig
Created August 12, 2013 19:52
Show Gist options
  • Save JiveDig/6214483 to your computer and use it in GitHub Desktop.
Save JiveDig/6214483 to your computer and use it in GitHub Desktop.
Genesis color picker and dynamic url changer for front end
// Create color style options
add_theme_support(
'genesis-style-selector',
array(
'latent-blue' => __( 'Blue', CHILD_DOMAIN ),
'latent-green' => __( 'Green', CHILD_DOMAIN ),
'latent-orange' => __( 'Orange', CHILD_DOMAIN ),
'latent-red' => __( 'Red', CHILD_DOMAIN ),
)
);
// Add theme color body class for demoing colors
add_filter( 'body_class', 'latent_add_category_class_single' );
function latent_add_category_class_single( $classes ) {
$classes[] = 'latent-' . $_GET['color'];
return $classes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment