• 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

Can someone help me with the code to put an image full width in the header?

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 › Design Tips and Tricks › Can someone help me with the code to put an image full width in the header?

This topic is: not resolved

Tagged: focus pro, header image, site-header

  • This topic has 4 replies, 3 voices, and was last updated 5 years, 8 months ago by Brad Dalton.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • July 24, 2017 at 6:50 pm #209545
    Dianne
    Participant

    I am trying to replace the title on my Focus Pro template with a customized image. But I can't figure out the code I need to do that. I'd like it to be 300 vertical by 1100 (or full-width).

    Thank you!

    http://wellness411center.com
    July 24, 2017 at 9:52 pm #209548
    Brad Dalton
    Participant

    There's 2 steps

    1. Change the dimensions in the PHP code on lines 45 and 46 of functions.php

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

    2. Change the height in the CSS under the site header section on line 979 to match the height of your image.

    .header-image .site-title a {
    	float: left;
    	min-height: 100px;
    	width: 100%;
    }
    

    Untested but that should work.


    Tutorials for StudioPress Themes & WooCommerce.

    July 25, 2017 at 8:19 am #209565
    Dianne
    Participant

    Thank you! I had the code and then lost it when my computer crashed. Sadly, a lot of my html comes from snippets like this which I save in a file.

    Dianne

    September 1, 2017 at 3:43 pm #211042
    CeeInTx
    Participant

    Hey, Brad!

    I've been wrestling with this for a couple of days.

    I followed another tutorial of yours that said do it with css OR change the php function file. I tried both, but they're not working.

    I'm using the Genesis Sample theme and trying to get the header image to go all the way across and be centered over the content.

    http://ecbiz200.inmotionhosting.com/~violet28/

    Any ideas greatly appreciated!

    September 1, 2017 at 9:47 pm #211044
    Brad Dalton
    Participant

    Looks like you have this working now @CeelnTx


    Tutorials for StudioPress Themes & WooCommerce.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ 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