Site logo

Archived topic

Ubermenu problem with Generatepress

3 replies · Started by Gelu-Dănuț on April 5, 2020

Viewing posts 1–4 of 4

Hello,

I try to insert this code in Snipest to make Ubermenu work in Generatepress Theme:

if ( ! function_exists( 'generate_navigation_position' ) ) {
function generate_navigation_position(){
if( function_exists( 'ubermenu' ) ){
ubermenu( 'main' , array( 'theme_location' => 'primary' ) );
}
}
}

/* Stop the theme from filtering the menu output */
add_action( 'wp_head' , 'stop_generatepress_menu_filter' );
function stop_generatepress_menu_filter(){
remove_filter( 'walker_nav_menu_start_el', 'generate_nav_dropdown', 10, 4 );
}

But i get this error:

"The snippet has been deactivated due to an error on line 3:

Cannot redeclare function generate_navigation_position."

Can you help me please?

Hi there,

Do you have any other functions that's already using the generate_navigation_position function?

Let me know :)

I honestly don't know where I can see if I have any other functions that’s already using the generate_navigation_position function. Can you help me with that? My site is https://dev.nmcromania.ro/.

This archived topic is closed to new replies.