• 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

Ambiance: Want to have the header area fixed

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 › Ambiance: Want to have the header area fixed

This topic is: not resolved

Tagged: ambiance

  • This topic has 4 replies, 2 voices, and was last updated 10 years, 11 months ago by Dag-Erling.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • June 12, 2014 at 8:16 am #109480
    Dag-Erling
    Member

    Hello

    I'm working on this page

    http://www.dagerlingjensen.no/montasje

    The client would like too have a "measuring band" under the header area. Basically a border but the border needs to be an image that repeats itself.

    In order to make this as clean as possible I would also like to remove the shrinking effect from the header. (You see that when you scroll down)

    http://www.dagerlingjensen.no/montasje
    June 12, 2014 at 3:07 pm #109511
    JanHoek
    Participant

    Ok let's give it a try 🙂

    Put this in your functions.php

    function after_header_content() {
        echo '<div class="after-header"></div>';
    };
    add_action('genesis_after_header', 'after_header_content', 10 );

    Than add something like this to your CSS

    .after-header {
    	background: url(your-image.jpg) repeat-x;
    	height: 20px;
    	margin-top:100px; (relative to the height of your header)
    	position: fixed;
    	width: 100%;
    }

    And

    @media only screen and (max-width: 1023px) {
    
    .after-header {
            display: none;
    }

    Lets see if it works


    Hi, my name is Jan Hoek. Sure, they all say I have a big head, but I like to think it’s way too small for all my ideas.

    June 13, 2014 at 3:37 am #109557
    Dag-Erling
    Member

    Hey Jan

    That did the trick, thank you so much :D. Kinda wish I new php when I do this.

    Now I just need to work with the CSS to make it fit on the screen. A bit of a hassle with the responsive system but I will work.

    June 13, 2014 at 3:43 am #109558
    JanHoek
    Participant

    Super. Glad I could help.


    Hi, my name is Jan Hoek. Sure, they all say I have a big head, but I like to think it’s way too small for all my ideas.

    June 13, 2014 at 4:06 am #109560
    Dag-Erling
    Member

    In case someone else wants to do the same thing you need to add this into the effects.js to make sure the image also gets the shrink effect.

    	$(document).on("scroll", function(){
    
    		if($(document).scrollTop() > 100){
    
    			$(".after-header").addClass("shrink");			
    
    		} else {
    
    			$(".after-header").removeClass("shrink");			
    
    		}
  • 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

© 2025 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