Cannot edit menu - by fan - on WordPress WooCommerce support

This topic has 4 replies, 3 voices, and was last updated 8 years ago ago by Jack Richardson

  • Avatar: fan
    fan
    Participant
    March 24, 2016 at 14:39

    Hi I just edit my menu but the front page is not changed.

    Please, contact administrator
    for this information.
    3 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    March 24, 2016 at 15:29

    Hello,

    Please provide us with correct FTP and wp-admin panel credentials in Private Content.

    Regards,
    Eva Kemp.

    Avatar: fan
    fan
    Participant
    March 29, 2016 at 17:48

    I already purge cache and disable W3TC but still can not change menu. now the front and back menu are different.

    Please, contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    March 30, 2016 at 11:09

    Hello,

    I’ve added this code in child functions.php file:

    function et_get_main_menu($menu_id = 'main-menu') {
        $custom_menu_slug = 'custom_nav';
        $cache_slug = 'et_get_' . $menu_id;
        if($menu_id == 'main-menu-right') $custom_menu_slug = 'custom_nav_right';
        $custom_menu = etheme_get_custom_field( $custom_menu_slug );
        $one_page_menu = '';
        if(etheme_get_custom_field('one_page')) $one_page_menu = ' one-page-menu';
        if(!empty($custom_menu) && $custom_menu != '') {
            $output = false;
            //$output = wp_cache_get( $custom_menu, $cache_slug );
            if ( !$output ) {
                ob_start(); 
                
                wp_nav_menu(array(
                    'menu' => $custom_menu,
                    'before' => '',
                    'container_class' => 'menu-main-container'.$one_page_menu,
                    'after' => '',
                    'link_before' => '',
                    'link_after' => '',
                    'depth' => 4,
                    'fallback_cb' => false,
                    'walker' => new Et_Navigation
                ));
                
                $output = ob_get_contents();
                ob_end_clean();
                
                wp_cache_add( $custom_menu, $output, $cache_slug );
            }
            
            echo $output;
            return;
        }
        if ( has_nav_menu( $menu_id ) ) {
            $output = false;
            //$output = wp_cache_get( $menu_id, $cache_slug );
            if ( !$output ) {
                ob_start(); 
                
                wp_nav_menu(array(
                    'theme_location' => $menu_id,
                    'before' => '',
                    'container_class' => 'menu-main-container',
                    'after' => '',
                    'link_before' => '',
                    'link_after' => '',
                    'depth' => 4,
                    'fallback_cb' => false,
                    'walker' => new Et_Navigation
                ));
                
                $output = ob_get_contents();
                ob_end_clean();
                
                wp_cache_add( $menu_id, $output, $cache_slug );
            }
            
            echo $output;
        } else {
            ?>
                <br>
                <h4 class="a-center">Set your main menu in <em>Appearance > Menus</em></h4>
            <?php
        }
    }

    Please clear cache and check menu now.

    Best regards,
    Jack Richardson.

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.