Move Genesis Nav to above the header in sample theme

Community Forums Forums General Discussion Move Genesis Nav to above the header in sample theme

This topic is: resolved

This topic contains 5 replies, has 2 voices, and was last updated by  David Chu 7 months, 1 week ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #105273

    Zach Russell
    Participant
    Post count: 48

    I am building a custom site where i’ll be customizing the sample theme. I originally moved the code to the genesis_before_header action hook, but I realized that I actually need it within the <header> to style it appropriately. I tried this code and it didn’t work:

    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_header', 'genesis_do_nav', 1);

    Any ideas on how to get this to work?


    ———-
    Zach Russell
    President, ProTech Internet Group

    #105284

    David Chu
    Participant
    Post count: 1428

    Hi,
    Give this a try. :-) It moves in into the header. It does create some styling differences because of the context, though!

    add_action( 'genesis_header', 'genesis_do_nav', 12);

    Cheers, Dave


    Dave Chu · Custom WordPress Developer – likes collaborating with Designers

    #105286

    Zach Russell
    Participant
    Post count: 48

    Hello David,

    Thank you for the quick response! That executes genesis_do_nav() in the <header> element, but does it at the bottom. I need this to execute before anything else in the header. Meaning before the site title/header image and header right, but still within the n<head> element.

    Does that make sense?

    Thanks


    ———-
    Zach Russell
    President, ProTech Internet Group

    #105297

    David Chu
    Participant
    Post count: 1428

    Zach,
    Yes, I do get it. Now that Genesis 2 is all HTML5, some experimentation is needed with priority to get things exactly where you want them. Because that’s sort of a big secret, I wrote an article about that, but I didn’t mention the header, I mostly concentrated on the content area. So I’d suggest playing with the number, and see what you get.

    My own tendency is to get things in the general area, and because of my CSS knowledge, I can finesse whatever I need that way.

    Good luck,
    Dave


    Dave Chu · Custom WordPress Developer – likes collaborating with Designers

    #105303

    Zach Russell
    Participant
    Post count: 48

    Thanks David,

    Looks like a priority of 5 did the trick!

    Cheers!


    ———-
    Zach Russell
    President, ProTech Internet Group

    #105319

    David Chu
    Participant
    Post count: 1428

    Beauty! Now you know something that even hardcore geeks might not know! :)


    Dave Chu · Custom WordPress Developer – likes collaborating with Designers

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.