Site logo

Archived topic

How to get rid of primary menu

3 replies · Started by rajkumarsm on October 27, 2020

Viewing posts 1–4 of 4

Hi, I have an issue with the menu.

I have created a mega menu using the ElementorsKit plugin. Everything is fine but on the mobile, still, the primary menu is loading.

I tried to unselect all the locations in 'View Locations' but no luck.

Could you please guide me on how to get rid of this.

My site: Software Testing Material

Thanks,
Rajkumar SM

You can try adding this PHP snippet.

add_action( 'after_setup_theme','tu_remove_all_header' );
function tu_remove_all_header() {
    remove_action( 'generate_header','generate_construct_header' );
    remove_action( 'generate_after_header', 'generate_menu_plus_mobile_header', 5 );
}

Here's how to add PHP - https://docs.generatepress.com/article/adding-php/

This snippet completely removes the header & nav on desktop view and the mobile header.

Hi Elvin,

I tried it but no luck. Have added the code in the child theme functions file.

Thanks

This archived topic is closed to new replies.