• Resolved janburg

    (@janburg)


    I’m on WordPress 4.0, using Genesis Frameworks 1.8.2, and I want to make the background behind the header and header widget a different color, it’s white now. Firebug tells me that color is generated by the sitename.com file – where do I find that file? It’s not the header.php, not in the CSS. It seems to me that is generated by WP using the custom header option, but that option does not give me a place to change the background color.

    Is there a way to change this? Is this a WP or Genesis issue?

    From Firebug:
    ” #header {
    background: url(“https://shertekinc.com/wordpress/wp-content/uploads/2014/09/Shertek-logo-blk-red.png”) no-repeat scroll 0 0 rgba(0, 0, 0, 0);

    https://shertekinc.com is the site.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello janburg,
    It looks like you have a widget (or plugin) named Dynamic Widgets, is that right?
    If so, there should the code that is causing that.

    Thread Starter janburg

    (@janburg)

    Dynamic Widgets would have a file named sitename.com? No, there’s no setting in Dynamic Widgets for changing background color, and it’s never been a problem with any of the other sites I’ve built, so it’s not the plugin. The shertekinc.com file is overwriting the css – where do I find the sitename.com file or how to change that?

    Your styles are all coming form a style.css file in the root of your WordPress installation:

    https://shertekinc.com/wordpress/wp-content/themes/SherTek-child/style.css

    You may want:

    #header {
      background: url(https://shertekinc.com/wordpress/wp-content/uploads/2014/09/Shertek-logo-blk-red.png) #000 no-repeat;
    }
    #header h1 {
      color: #fff;
    }

    That should get you headed in the right direction.

    That code is being generated in your header.php file. Can you paste it conntent here please?
    Also, do you use the custom background setting in your genesis theme?

    Thread Starter janburg

    (@janburg)

    @evan: I have this in my css”

    #header {
    background:url("https://shertekinc.com/wordpress/wp-content/uploads/2014/09/Shertek-logo-blk-red.png") no-repeat scroll 0 0;
    	background-color:#940015;
    		margin: 0 0 0 5px;
    	min-height: 175px;
    	width: 98.5%;
    }

    but the css is being overwritten by the shertekinc.com file, and Firebug points to the shertekinc.com file as the location of the code for the header background color.

    @lopwalj, the header.pep file says this:

    do_action( 'genesis_doctype' );
    do_action( 'genesis_title' );
    do_action( 'genesis_meta' );
    
    wp_head(); /** we need this for plugins **/
    ?>
    <link rel="icon" href="https://shertekinc.com/wordpress/favicon.ico" type="image/x.icon"/>
    <link rel="shortcut icon" href="https://shertekinc.com/wordpress/favicon.ico" type="image/x-icon"/>
    </head>
    <body <?php body_class(); ?>>
    <?php
    do_action( 'genesis_before' );
    ?>
    <div id="wrap">
    <?php
    do_action( 'genesis_before_header' );
    do_action( 'genesis_header' );
    do_action( 'genesis_after_header' );
    
    echo '<div id="inner">';
    genesis_structural_wrap( 'inner' );

    I don’t see where it has anything to do with the color of the file here.

    @janburg: can you paste the content of your functions.php file?.

    Thread Starter janburg

    (@janburg)

    functions.php file:

    <?php
    /** Start the engine */
    require_once( get_template_directory() . '/lib/init.php' );
    
    /** Child theme (do not remove) */
    define( 'CHILD_THEME_NAME', 'Sample Child Theme' );
    define( 'CHILD_THEME_URL', 'https://www.studiopress.com/themes/genesis' );
    
    /** Add Viewport meta tag for mobile browsers */
    add_action( 'genesis_meta', 'add_viewport_meta_tag' );
    function add_viewport_meta_tag() {
        echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
    }
    
    /** Remove the post meta function */
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
    
    /** Add support for custom background */
    add_custom_background();
    
    /** Add support for custom header */
    add_theme_support( 'genesis-custom-header', array( 'width' => 523, 'height' => 175 ) );
    
    /** Add support for 3-column footer widgets */
    add_theme_support( 'genesis-footer-widgets', 3 );

    Great! As I stated before, you have the custom header option enabled in Genesis. To change that, please replace your functions.php file content instead of this:

    <?php
    /** Start the engine */
    require_once( get_template_directory() . '/lib/init.php' );
    
    /** Child theme (do not remove) */
    define( 'CHILD_THEME_NAME', 'Sample Child Theme' );
    define( 'CHILD_THEME_URL', 'https://www.studiopress.com/themes/genesis' );
    
    /** Add Viewport meta tag for mobile browsers */
    add_action( 'genesis_meta', 'add_viewport_meta_tag' );
    function add_viewport_meta_tag() {
        echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
    }
    
    /** Remove the post meta function */
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
    
    /** Add support for custom background */
    add_custom_background();
    
    /** Add support for 3-column footer widgets */
    add_theme_support( 'genesis-footer-widgets', 3 );
    Thread Starter janburg

    (@janburg)

    Yes, that worked! I would not have connected the functions.php file to that outcome.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘changing color behind header and header widget’ is closed to new replies.