• On shakymolars.com, the php menu does not show up at all in Internet Explorer 7 or 8.

    header.php:

    <nav>
        <ul>
        	<li><?php wp_nav_menu(array('menu' => 'Main Nav Menu')); ?></li>
        </ul>
        </nav>

    functions.php:

    if (function_exists('register_nav_menus')) {
    		register_nav_menus(
    			array(
    				'main.nav' => 'Main Navigation Menu'
    			)
    		);
    	}

    Any ideas why? It seems to show up in all the other browsers just fine.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I’m having the same issue in all IE versions with similar code:

    <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>

    I tested out for the classic IE margin/float/width/absolute positioning/z-index issues, and it really seems like the menu items are literally not there, not just getting blocked out by something else.

    My site is https://griefland.com. (It’s behind an Under Construction plugin while working.)

    Thanks for your help!

    No one can really help if it’s behind that plugin. Check your code errors with https://validator.w3.org/

    I can make a username/pass for help, but not sure if I’m allowed to post that here?

    Please don’t. Never, ever, post login information on a public forum.

    That’s what I thought. So how can I create a user so you guys can help? Much appreciated!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Julia,
    The hierarchy of child elements through the wp_nav_menu() function means the CSS for the menu will break in older Internet Explorer browsers.
    A specific example is through the CSS selector li > ul.

    Perhaps this has something to-do with your issue.

    Yeah, it sure seems like IE isn’t responding correctly to wp_nav_menu, but it’s also broken even in newer versions, so I’m really not sure where the issue is.

    Do you have any resources I can read about the li > ul issue?

    Should I replace wp_nav_menu with an older function?

    Blargh. Thanks for your help!

    Actually, it turned out that my renderer just wasn’t showing it right, and the menu *does* work in IE. I was able to fix other issues through CSS tweaks. Thanks guys!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘NAV php menu disappears in IE7 and IE8’ is closed to new replies.