WordPress.org

Support

Support » How-To and Troubleshooting » (TwentyTwelve) Customize header text function

(TwentyTwelve) Customize header text function

  • Hello everybody!

    At the moment am working with the TwentyTwelve theme. I am trying to change the customize functions.

    With the theme you can only change the color of the title and tagline. What I want is that the user can change the font, size and color. Is it also possible to change the colors of the title and tagline seperate? (for e.g. the title is yellow and the tagline is blue.)? Also how can I add a second colorpicker in the customize window?

    When I look at the next code I think I have to change/ add something in the else :
    ?>
    .site-title a,
    .site-description {
    color: #<?php echo $text_color; ?> !

    Could something help me with this problem?

    Thank you in advance!

    function twentytwelve_header_style() {
    	$text_color = get_header_textcolor();
    
    	// If no custom options for text are set, let's bail
    	if ( $text_color == get_theme_support( 'custom-header', 'default-text-color' ) )
    		return;
    
    	// If we get this far, we have custom styles.
    	?>
    	<style type="text/css">
    	<?php
    		// Has the text been hidden?
    		if ( ! display_header_text() ) :
    	?>
    		.site-title,
    		.site-description {
    			position: absolute !important;
    			clip: rect(1px 1px 1px 1px); /* IE7 */
    			clip: rect(1px, 1px, 1px, 1px);
    		}
    	<?php
    		// If the user has set a custom color for the text, use that.
    		else :
    	?>
    		.site-title a,
    		.site-description {
    			color: #<?php echo $text_color; ?> !important;
    		}
    	<?php endif; ?>
    	</style>
    	<?php
    }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘(TwentyTwelve) Customize header text function’ is closed to new replies.