Created
August 12, 2013 19:52
-
-
Save JiveDig/6214483 to your computer and use it in GitHub Desktop.
Genesis color picker and dynamic url changer for front end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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