[Support request] Display Navigation Under Header

Home Forums Support [Support request] Display Navigation Under Header

Home Forums Support Display Navigation Under Header

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1570315
    Dom

    I am trying to get the main navigation to display below the header on my site yet selecting the ‘display below header’ in the appearance options seems to have little affect.

    My header is a slider which I have made using ‘Smart Slider’ and I used GP Elements to make a header including the slider shortcode.

    Using the position options in either the theme options or within the Elements Header options to set navigation below header is having no effect – not sure why this is, it’s not making much sense.

    I have managed to use GP Hooks to place some text above the main navigation so I’m guessing I’m probably in the right ballpark but not sure exactly what code I need link it all together so the GP elements header appears below the navigation bar.

    Please advise, thanks!

    #1570322
    David
    Staff
    Customer Support

    Hi there,

    set the Primary Navigation Location to Below Header.

    And add this PHP Snippet to your site:

    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 );
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/

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