How to Remove Primary Navigation Menu in Astra?

No results found. Try again with different words?

Search must be at least 3 characters.

    Remove Primary Navigation Menu with Hook

    Description

    To remove Primary Navigation Menu, you can add the following PHP code –

    remove_action( 'astra_masthead_toggle_buttons', 'astra_masthead_toggle_buttons_primary' );
    remove_action( 'astra_masthead_content', 'astra_primary_navigation_markup', 10 );

    Example

    function remove_primary_menu_callback() {
        remove_action( 'astra_masthead_toggle_buttons', 'astra_masthead_toggle_buttons_primary' );
        remove_action( 'astra_masthead_content', 'astra_primary_navigation_markup', 10 );
    }
    add_action( 'init', 'remove_primary_menu_callback' );

    Check out the doc that explains how to add custom PHP code using the child theme’s functions.php file. 

    Was this article helpful?
    Did not find a solution? We are here to help you succeed.

    Related Docs

    Scroll to Top

    Download is Just A Click Away!

    Be among the first to try the beta version of Astra’s Header Footer Builder. Filling the form will ensure you’ll be the first to learn about updates and features.

    Download is Just A Click Away!

    Enter your email address and be the first to learn about updates and new features.