[Resolved] Home-Page like Twenty Seventeen 2

Home Forums Support [Resolved] Home-Page like Twenty Seventeen 2

Home Forums Support Home-Page like Twenty Seventeen 2

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1035084
    Carl

    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

    #1035157
    David
    Staff
    Customer Support

    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.

    #1035383
    Carl

    Thank you David! Now I understand it.

    Kind regards
    Wolfgang

    #1035386
    David
    Staff
    Customer Support

    You’re welcome

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.