• 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

Suggestion: Hook inside the header but outside the wrap

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 › Suggestion: Hook inside the header but outside the wrap

This topic is: resolved

Tagged: header, hook, suggestion, wrap

  • This topic has 4 replies, 2 voices, and was last updated 9 years, 7 months ago by jaxweb.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 14, 2017 at 9:12 am #199378
    jaxweb
    Participant

    There are no hooks within the header but outside the wrap. The reason why I want this is that the <header> stretches the width of the screen. So if i want a div that is confined within the header but also stretches across the entire screen, there's not a simple solution for me to do so. All hooks are outside the header or within the wrap with a max-width of 1200px.

    new header hook

    January 14, 2017 at 10:55 am #199382
    Victor Font
    Moderator

    If you want to change the width of the header to full screen, you only have to change the width of .site-header .wrap in CSS. There's no need for extra hooks. You should know though, that when you post on this forum, you are not communicating with Studio Press. This forum is handled by community volunteers.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    January 14, 2017 at 11:48 am #199392
    jaxweb
    Participant

    I want the wrap to stay at 1200 pixels wide because i want to keep the content (logo & widgets) within that width. I have a fixed header and wish to move the navigation within the header but adjust it based on the the dynamic height of the header as it adjusts in height based on the widgets and logo content within it. This would also eliminate the adjustments i have to make within css to make fixed navigation positions at all breakpoints and then adjust the site-inner as well based on the breakpoints. This is a bit much and gets complex and creates too much testing If i can just make the header fixed, all i need to do is adjust the site-inner location from the top based on the height of the header.

    SO this is what i'm trying to do
    site headre wrap something

    January 15, 2017 at 1:12 pm #199423
    Victor Font
    Moderator

    You didn't mention what theme you are using, but this code does what you want for the Genesis Sample theme. You may have to change the action priorities if they've been changed from the Genesis defaults:

    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
    add_action('genesis_header', 'add_nav_after_structural_wrap', 15);
    
    function add_nav_after_structural_wrap() {
    
    	genesis_structural_wrap( 'header', 'close' );
    	genesis_markup( array(
    		'close'   => genesis_do_nav() . '</header>',
    		'context' => 'site-header',
    	) );
    
    }

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    January 16, 2017 at 11:08 am #199483
    jaxweb
    Participant

    Thank You so much. that worked great!

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Suggestion: Hook inside the header but outside the wrap’ is closed to new replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

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