WordPress.org

Ready to get started?Download WordPress

Forums

(TwentyTwelve) Customize header text function (3 posts)

  1. RKerckhoffs
    Member
    Posted 1 year ago #

    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
    }
  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Are you using a Child Theme? You absolutely should not be making modifications to the default theme.

    http://codex.wordpress.org/Child_Themes

  3. RKerckhoffs
    Member
    Posted 1 year ago #

    It is just for testing purposes. So without a Child theme. Could you still explain to me how to solve the problem?

Topic Closed

This topic has been closed to new replies.

About this Topic