php fatal error

25-Jul-2017 15:32:10 UTC] PHP Fatal error:  Cannot redeclare mfn_wp_nav_menu() (previously declared in /home/shadxddj/JM.shaddixproductions.design/wp-content/themes/betheme/functions/theme-menu.php:29) in /home/shadxddj/JM.shaddixproductions.design/wp-content/themes/betheme/functions.php on line 179

Can someone help me fix this error quickly?

Comments

  • this is what theme-menu.php looks like

    if( ! function_exists( 'mfn_wp_nav_menu' ) )
    {
    function mfn_wp_nav_menu() 
    {
    $args = array( 
    'container' => 'nav',
    'container_id' => 'menu', 
    'menu_class' => 'menu', 
    'fallback_cb' => 'mfn_wp_page_menu', 
    'depth' => 5,
    'link_before'      => '<span>',
    'link_after'      => '</span>',
    );
    // Mega Menu | Custom Walker
    $theme_disable = mfn_opts_get( 'theme-disable' );
    if( ! isset( $theme_disable['mega-menu'] ) ){
    $args['walker'] = new Walker_Nav_Menu_Mfn;
    }
    // Custom Menu
    if( mfn_ID() && is_single() && get_post_type() == 'post' && $custom_menu = mfn_opts_get( 'blog-single-menu' ) ){
    // Theme Options | Single Posts
    $args['menu'] = $custom_menu;
    } elseif( mfn_ID() && is_single() && get_post_type() == 'portfolio' && $custom_menu = mfn_opts_get( 'portfolio-single-menu' ) ){
    // Theme Options | Single Portfolio
    $args['menu'] = $custom_menu;
    } elseif( $custom_menu = get_post_meta( mfn_ID(), 'mfn-post-menu', true ) ){
    // Page Options | Page
    $args['menu'] = $custom_menu;
    } else {
    // Default
    $args['theme_location'] = 'main-menu';
    }
    wp_nav_menu( $args ); 
    }
    }
  • Hi,
    if you have changed the theme files yourself we cannot help. We do not support theme files modification. Please reinstall the theme to fix it.
    thanks
Sign In or Register to comment.