Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
$15
WP 3.0 Navbar Broken in IE6 and IE7
In IE6 and IE7, all of the navbar items appear as dropdowns under the "Home" button.
I haven't had the time to pinpoint what I need to adjust to make a fix.
Could you look at my code and help me determine what I need to tweak to get the menu to appear normal in IE6 and IE7?
http://rebuildingtogethermuscatine.org
This question has been answered.
Ethan Anderson | 09/23/10 at 3:38pm
Edit
(3) Possible Answers Submitted...
See a chronological view of answers?
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
-

Last edited:
09/24/10
7:14pmVictor Teixeira says:I need to see the code of the theme. Usually the header.php file.
There's really something wrong with your code since the generated html is wrong.
There's a div and another ul nested inside the nav ul.
Put the file on http://gist.github.com or http://pastebin.com or another place where I can check it.- 09/23/10 4:05pm
Victor Teixeira says:Actually you don't need this code in functions.php to remove the container div.
The full menu code for your menu should be this:
<div id="navbar">
<?php wp_nav_menu( array( 'menu' => 'the_menu_name', 'menu_id' => 'nav', 'menu_class' => 'menu', 'container' => '' ) ); ?>
</div>
Where the_menu_name should be changed by the name of the menu created on the wordpress interface.
If the Home link then disappears from your menu, just add it on the menu management page inside wordpress admin panel.
That's it - 09/23/10 4:46pm
Ethan Anderson says:Victor, I tried this and it worked great. The menu now works in IE6 and IE7, with one glitch: The Home link on the menu is not highlighted when I'm on the home page. How do I remedy this?
- 09/23/10 4:50pm
Ethan Anderson says:Here's the header.php
http://gist.github.com/594298 - 09/23/10 4:57pm
Victor Teixeira says:I see that you put / as the home menu link address.
Try changing this to http://rebuildingtogethermuscatine.org/
Let's see if it works. - 09/23/10 5:30pm
Ethan Anderson says:Done. No luck.
- 09/23/10 9:17pm
Victor Teixeira says:Replace the code from line 28 to 34 on your header.php with this:
<body id="<?php echo (is_home()) ? 'home' : 'site' ; ?>">
<?php include(TEMPLATEPATH."/header_options.php");?>
<div id="navbar">
<?php wp_nav_menu( array( 'menu' => 'main_menu', 'menu_id' => 'nav', 'menu_class' => 'menu', 'container' => '' ) ); ?>
</div>
Then on your style.css add this:
#home #nav .menu-item-home a { background: #4EA737; }
This is the simplest solution to the problem. - 09/24/10 3:59pm
Ethan Anderson says:Ok, I tried just what you suggested, but it still didn't do the trick.
Thanks for your help with this - any other ideas? - 09/24/10 4:47pm
Victor Teixeira says:I looked at your site and it's not adding the home id to the body.
Did you put this on the body: <body id="<?php echo (is_home()) ? 'home' : 'site' ; ?>">
If you put and it didn't work try this instead:
<body id="<?php echo (is_front_page()) ? 'home' : 'site' ; ?>">
All we need is the id="home" on the body tag of the homepage.
This is the complete code:
<body id="<?php echo (is_front_page()) ? 'home' : 'site' ; ?>">
<?php include(TEMPLATEPATH."/header_options.php");?>
<div id="navbar">
<?php wp_nav_menu( array( 'menu' => 'main_menu', 'menu_id' => 'nav', 'menu_class' => 'menu', 'container' => '' ) ); ?>
</div>
- 09/24/10 7:13pm
Ethan Anderson says:Ahhh Victor! I forgot that I was using a caching plugin. Turning off caching made the changes appear and work fine. I suppose it was the caching that was preventing me from seeing the change the first time. I didn't have to add your latest code.
Now it seems to be working great, and I am very grateful to you for your help.
Thanks 1,000,000.
Ethan
- 09/23/10 4:05pm
-

Last edited:
09/23/10
3:52pmCosmin Popovici says:You have a div after the Home link, div which holds another UL
Your code should look like this:
<ul>
<li>Home</li>
<li>About
<ul>
<li>Subpage</li>
</ul>
</li>
</ul>
Remove any code from the div with the id of navbar and make sure you're calling the menu right:
<?php wp_nav_menu( array( 'menu_id' => 'nav', 'menu_class' => 'nav', 'theme_location' => 'primary' ) ); ?>
Also, add this in functions.php, to remove the menu container div:
// remove menu container div
function my_wp_nav_menu_args( $args = '' )
{
$args['container'] = false;
return $args;
} // function
add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );
Hope it helps :) -
Last edited:
09/23/10
3:59pmKailey Lampert says:Without seeing the original code, it's hard to tell for sure, but it looks like you might have something like this going on:
<ul id="nav">
<?php wp_list_pages(...); ?>
<?php wp_nav_menu(...); ?>
</ul>
the wp_list_pages() appears to only be calling the home page, so I'd just move that into whatever custom menu you're using and remove the <ul>s and wp_list_pages() function from the theme leaving this:
<?php wp_nav_menu(...); ?>
Previous versions of this answer: 09/23/10 at 3:59pm
This question has expired.
Current status of this question: Completed
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
