• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Header image size change

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Header image size change

This topic is: not resolved

Tagged: header image, Logo, size

  • This topic has 6 replies, 2 voices, and was last updated 9 years, 9 months ago by rcwatson.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • December 30, 2013 at 1:09 pm #82136
    rcwatson
    Member

    Hi. I’m having a problem when I upload my header image, which is the customer's logo. The theme wants to crop it to the default size that comes with the template (200?—100 or something). My customer's logo is slightly taller at 200x139.

    To match the height and width of my customer’s logo, I modified the following code in my functions.php to what you see below

    //* Add support for custom header
    add_theme_support( 'custom-header', array(
        'width'           => 200,
        'height'          => 139,
        'header-selector' => '.site-title a',
        'header-text'     => false
    ) );

    but I haven’t done any other CSS changes. I just need the logo to default crop to 200?—139, not that 200?—100 size that it wants to do by default, which results in the logo being chopped off at the bottom.

    http://stage.custombuiltwindows.com
    December 30, 2013 at 1:31 pm #82142
    Brad Dalton
    Participant

    You may need to change the Value for the height in the CSS as well.

    /* Logo, hide text */
    
    .header-image .site-header .wrap {
    	background: url(images/logo.png) no-repeat left;
    	padding: 0;
    }
    
    .header-image .site-title a {
    	float: left;
    	min-height: 164px;
    	width: 100%;
    }
    

    Around line 895 of your child themes sty;e.css file.

    You could also try uploading your image to your child themes images folder and naming it logo rather than use the Custom Header function as a second option.


    Tutorials for StudioPress Themes & WooCommerce.

    December 30, 2013 at 6:46 pm #82197
    rcwatson
    Member

    Thanks. Adding that CSS did the trick.

    January 1, 2014 at 7:02 pm #82584
    rcwatson
    Member

    Hi Brad,

    I have a followup question for you on this one. The customer would like an ad to appear to the right of the site title header (the logo). I decided to go with the AdRotate plugin for ad management. It has a widget for adding new ads throughout the site.

    I added a new CSS class:

    .site-title-ad-area {
    	border-style:solid;
    	border-width:5px;
    	width:940px;
    	height:139px;
    	margin-left:200px;
    }

    Then I added a new widget and widget area by modifying functions.php and front-page.php thusly:

    front-page.php

    genesis_widget_area( 'title-area-adrotate', array(
    	'before' => '<div class="site-title-ad-area widget-area"><?php echo adrotate_ad(1); ?>',
    	'after'  => '</div>',
    ) );

    The code

    <?php echo adrotate_ad(1); ?>

    is what brings in the ad.

    functions.php

    genesis_register_sidebar( array(
    	'id'          => 'title-area-adrotate',
    	'name'        => __( 'Title Area AdRotate', 'executive' ),
    	'description' => __( 'This is the ad section on the title bar of the whole site.', 'executive' ),
    ) );

    See http://stage.custombuiltwindows.com for how it looks now. You'll see how this puts the ad banner just above the slider and below the menu. But what I really want is for it to appear above the menu and directly to the right of the logo in the title bar. I just can't figure out where to place the AdRotate code to get that to happen. There's not a "header.php" file as I've become accustomed to with some other themes (though I know that isn't always the best way).

    Is there a way to drop my adrotate code

    <?php echo adrotate_ad(1); ?>

    into that spot next to the logo?

    Thanks

    January 2, 2014 at 4:02 am #82640
    Brad Dalton
    Participant

    You could hook it in from your functions file using the genesis_header hook and position it using CSS.

    Or you could use the header right widget area instead or the header right widget hook.


    Tutorials for StudioPress Themes & WooCommerce.

    January 2, 2014 at 10:58 pm #82834
    rcwatson
    Member

    I backed off my previous changes noted above, and then I added the following to CSS under Widget Area:

    .site-header .widget-area {
    	border-style:solid;
    	border-width:1px;
    	width:940px;
    	height:139px;
    	margin-left:200px;
    }

    Then, I added my AdRotate widget to the Header Right widget area within the Widget manager in the Dashboard.

    That got me what you see now at http://stage.custombuiltwindows.com. Problem is, the image itself is not appearing, even though the rendered code (according to Chrome Inspector) says that it should. See http://postimg.org/image/f8u4jm8wn/ for what I'm seeing in the Inspector vs. on the page itself. The black rectangle is where I've outlined where the image should appear.

    Maybe I'm not doing the CSS correctly?

    Thanks.

    January 2, 2014 at 11:25 pm #82839
    rcwatson
    Member

    Ah, never mind. I figured it out. I was using the secure Epic browser which seemed to be blocking the image from showing for some reason. A very minor browser most people don't even know about, and it's not an issue on Chrome/FF/IE. Sorry about that.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble