Main Menu Is not functioning correctly - by letsdesignit

This topic has 8 replies, 3 voices, and was last updated 9 years, 8 months ago ago by Eva Kemp

  • Avatar: letsdesignit
    letsdesignit
    Participant
    April 25, 2016 at 08:07

    I updated my main menu with some additional pages, and sub category. Although it does not view, it keeps showing the old menu (and links not working). But when i scroll down in the fixed menu it appears, but also with the old menu. So shows two menus. I have cleared cache and checked on other browsers but cannot get it to work.

    Can someone please have a look and see what the glitch is?

    Details in Private Section

    Please, contact administrator
    for this information.
    7 Answers
    Avatar: Eva
    Eva Kemp
    Participant
    April 25, 2016 at 09:02

    Hello,

    I’ve added this code in functions.php file to remove cached menu:

    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
        }
    }

    Clear browser cache and check now.

    Regards,
    Eva Kemp.

    Avatar: letsdesignit
    letsdesignit
    Participant
    April 25, 2016 at 21:48

    Thank you for fixing that, i also have an two other small issues

    1. On the shop page. the additional shop wideget i have added woocommerce filter by options, but they are not aligning and also the size one appears funny? Can you point me in the right direction to fix this?

    2. How do i change the colour of the font in the top right widget where i have added My Wishlist?

    3. On your theme Options – header – Enable top links (Register | Sign In) is on. But it appears as MY ACCOUNT / LOGOUT. So i cant see how the register | sign in form looks like? Or do i need to take it off maintenance mode and log out to show the register | Sign In Icon?

    Thanks

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    April 26, 2016 at 08:16

    Hello,

    1. Please show a direct page where the issue persists and show a screenshot.

    2. Use this code in Theme Options > Custom CSS > Global Custom CSS:

    .top-bar .topbar-widget.widget_nav_menu li a {
        color: #767676 !important;
    }

    3.

    Or do i need to take it off maintenance mode and log out to show the register | Sign In Icon?

    Yes, you need do it this way.

    Best regards,
    Jack Richardson.

    Avatar: letsdesignit
    letsdesignit
    Participant
    April 26, 2016 at 22:51

    Thank you!

    1. I have updated the top nav widget text. Although can you please advise how to change the code so it looks like the My Account | Sign out font? And so on hover it does not change to white, just underlines like the other text?

    2. I have changed the shop page to now have an image at the top so that is aligning, but it now the product pages. The Filter options do not align with the top of the side bar. See links.

    https://www.dropbox.com/home?preview=Product+Page+Sample-1.png

    https://www.dropbox.com/home?preview=Product+Page+Sample-2.png

    3. Thank you, i will check once off maintenance mode.

    Thank you for your continued support.

    Avatar: Eva
    Eva Kemp
    Participant
    April 27, 2016 at 09:07

    Hello,

    1. Please use this code in Global Custom CSS:

    .top-bar .topbar-widget.widget_nav_menu li a {
        font-size: 11px;
        font-family: open sans;
        text-transform: uppercase;
    }
    .top-bar .topbar-widget.widget_nav_menu li a:hover {
        color: #767676 !important;
    }

    2. Please use this css code:

    .category-description {
        margin-bottom: 0px;
    }

    Regards,
    Eva Kemp.

    Avatar: letsdesignit
    letsdesignit
    Participant
    April 27, 2016 at 12:53

    Thank you

    Avatar: Eva
    Eva Kemp
    Participant
    April 27, 2016 at 14:10

    Hello,

    You’re welcome.

    Regards,
    Eva Kemp.

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

The issue related to '‘Main Menu Is not functioning correctly’' has been successfully resolved, and the topic is now closed for further responses

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