Black Friday Sale! Get up to $40 off GP Premium!Learn more

[Support request] main navigation menu after the pageheader, but only on the home page

Home Forums Support main navigation menu after the pageheader, but only on the home page

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #450979
    Teresa

    Hello
    I would like to put the main navigation menu after the pageheader, but only on the home page.
    Is it possible to do this?
    Thank you very much

    GP Premium 1.5.6
    #451007
    Leo
    Staff
    Customer Support

    Hi there,

    Give this snippet a shot:

    add_action('wp','generate_change_nav_position');
    function generate_change_nav_position()
    {
        if ( is_front_page() ) {
            remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
            add_action( 'generate_after_header', 'generate_add_navigation_after_header', 29 );
        }
    }

    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.