• 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

A simple HOOK question

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 › A simple HOOK question

This topic is: resolved
  • This topic has 4 replies, 2 voices, and was last updated 13 years, 3 months ago by Peter.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • February 11, 2013 at 2:43 pm #19680
    Joseph Lee
    Member

    I was trying to hook my navigation in the header. I used

    /** Reposition the primary navigation menu */
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_header', 'genesis_do_nav' );

    This code drops my nav <div> after all of the header elements. Is there a way to make it drop it at the TOP of the <header>? Is there a way to control where you drop the code in a div?

     

    http://mainstreetelite.com/

    February 11, 2013 at 4:07 pm #19704
    Peter
    Member

    If you wanted the nav before the header, you could use;

    /** Reposition the primary navigation menu */
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_before_header', 'genesis_do_nav' );

    Or if you wanted it in the header itself but before the title ..etc, you could use;

    /** Reposition the primary navigation menu */
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_header', 'genesis_do_nav', 9 );
    February 11, 2013 at 4:08 pm #19705
    Joseph Lee
    Member

    So    ,  9 tells the hook where to put it in the hook div? Where is documentation I can read to understand how it works.

     

    Peter, thank you so much for letting me know it was doable. I am REALLY in love with Genesis now.

    February 11, 2013 at 4:14 pm #19708
    Joseph Lee
    Member

    Okay, that is called priority. Thanks Peter. I looked it up. I didn't realize that was one of the par. of hook

    February 11, 2013 at 4:16 pm #19710
    Peter
    Member

    Yeah, sort of 🙂

    The last number is the priority for the action, which basically dictates when it runs. If it's got a lower number than other actions, it runs before them. I'm not sure if there is Genesis specific documentation on action priorities, but you can see them if you look through the code.

    You're welcome!

    Edit: Oops, you beat me to it..

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘A simple HOOK question’ 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