Site logo

Archived topic

Home-Page like Twenty Seventeen 2

3 replies · Started by Carl on October 15, 2019

Viewing posts 1–4 of 4

Hello,

I want to create the homepage of my website like the theme Twenty Seventeen:
1. An image above the header .
2. The main navigation and the header should be at the bottom of the window.
3. By scrolling down, the stikcky main navigation should go to the top of the window and should be fixed on Top while scrolling.

This Website is the exact example:
https://schalkenbach.org

This is my web-project:
https://www.simon-weber.de/wp2019/
To do is that the navigation is not on the bottom of the window.

Thank you!
Wolfgang

Hi there,

you can use this PHP snippet to move the primary navigation below the header element:

add_action( 'after_setup_theme','craig_move_navigation' );
function craig_move_navigation() {
    remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
    add_action( 'generate_after_header', 'generate_add_navigation_after_header', 15 );
}

It will require some CSS to calculate the height of the Header element - to make it full screen minus the height of the header eg.

.page-hero {
    height: calc(100vh - 60px);
}

Adjust the 60px to match the height of the navigation.

Thank you David! Now I understand it.

Kind regards
Wolfgang

You're welcome

This archived topic is closed to new replies.