WordPress.org

Ready to get started?Download WordPress

Forums

TwentyTwelve child theme - Change main title color (7 posts)

  1. davm
    Member
    Posted 1 year ago #

    Hello everyone,

    I have created a child theme from Twenty Twelve and after changing the background color for the whole website to black, I am trying to change the color of the title from black to something else, but I failed so far.

    This is what I see in the theme:

    media="all"
    .site-header h1 a, .site-header h2 a {
    color: #515151;
    display: inline-block;
    text-decoration: none;
    }
    .site-title a, .site-description {
    color: #000000 !important;

    The line color: #515151; actually appears to be crossed, so when I tried to change the color code in the CSS for my child theme it was obviously to now avail. However, I had no results also when I tried to change the latter color code, from #000000 to something else. I did try to delete the cache but nothing changed. I don't really know what I'm doing wrong. Thanks for your help.

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Where is this style:

    .site-title a, .site-description {
     color: #000000 !important;

    Coming from? It doesn't look like it's from the original stylesheet.

  3. davm
    Member
    Posted 1 year ago #

    I'm not sure. It is not in the original stylesheet, as you say and I did not touch that.
    This is what the stylesheet for my child theme looks like:

    /*
    
    Theme Name: Child of Twenty Twelve
    Description: Test child theme based on Twenty Twelve
    Author: Davide
    Version: 0.0.1
    Template: twentytwelve
    
    */
    
    @import url('../twentytwelve/style.css');
    
    /* 
    
    Change site background color to black
    
    */
    
    .site {
    padding: 0 24px;
    padding: 0 1.714285714rem;
    background-color: rgb(0, 0, 0);
    }
  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Can you try deactivating plugins to explore whether any are responsible?
    Can you also link the site/webpage in question?

  5. davm
    Member
    Posted 1 year ago #

    The only activated plugin I have is YARPP, but the same problem occurred before I installed and activated it.
    I don't think I can link the website as I'm working on it as a localhost with MAMP. Here's a scan of what the page looks like with a red circle where the title is (although invisible, due to the black background):
    http://www.dropbox.com/s/y0c2q1r1fdwsfx6/site.tiff

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    Did you edit the header.php file? It looks as though the !important style is coming directly from the <head> section of the webpage.

  7. davm
    Member
    Posted 1 year ago #

    Yes, but all I did was copy this:

    <?php $header_image = get_header_image();
    		if ( ! empty( $header_image ) ) : ?>
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    		<?php endif; ?>

    And paste it a few lines up, in order to get my header image on top of the main website title.

Topic Closed

This topic has been closed to new replies.

About this Topic