• 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

Custom Header must be cropped even when correct size

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 › Custom Header must be cropped even when correct size

This topic is: not resolved

Tagged: Custom header, Image too large

  • This topic has 4 replies, 2 voices, and was last updated 9 years, 9 months ago by Anita.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • August 19, 2013 at 6:13 am #57285
    sgarson
    Member

    When I try to add my header image, even though it is the correct size, I am forced to crop the image. The result is an oversized and pixelated image. CSS file as the image default width as 495 pixels. If I import an image with only 100 pixel width, I still am forced to crop it, so you can imagine how bad it looks. On the header screen, it says if the image imported is 495 x 145 pixels, it will be used as is and not be cropped, but this is not the case.

    How can I figure out what is wrong? Using Genesis 2.0.0, Minimum Child Theme 2.0.1

    Steve Garson
    Boston, MA

    http://networksolutionexperts.com
    August 19, 2013 at 6:25 am #57286
    Anita
    Keymaster

    Open up your functions.php file. Look for custom header in there. Change the measurements in there to your logo's measurements. Save it. Then go back and upload it again. It should NOT ask you to crop it.


    Love coffee, chocolate and my Bella!

    August 19, 2013 at 6:32 am #57288
    sgarson
    Member

    This is the code that is in the functions.php file. No matter what size image I import, I am forced to crop the width by 50%. I am using a file that is 495x145. If I use a file 100x15, I still need to crop half the width,

    /** Add support for custom header */
    add_theme_support( 'genesis-custom-header', array(
    'width' => 495,
    'height' => 145
    ) );

    August 19, 2013 at 6:39 am #57289
    Anita
    Keymaster

    Copy and paste my code REPLACING your code. Tell me if it works.

    EDITED THIS!!!

    add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 200 ) );


    Love coffee, chocolate and my Bella!

    August 19, 2013 at 6:41 am #57291
    Anita
    Keymaster

    Dang it... this thing is stripping code!!!

    Use Brad's instructions here - https://gist.github.com/braddalton/5594613.

    Replace your old code with his code.


    Love coffee, chocolate and my Bella!

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 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