• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 529
  • Last Modified:

Wordpress 3.0 navigation issues

I have a wordpress site that has two templates. One template is the home page and the other is for every other page accept the home page. I added a multi teired navigation menu through menus and the navigation works fine on the second template pages. But, when I try to add that same navigation code to my home page it doesn't show the sub menus. FYI, I have my home page set to static. Can I not use the same code and css for the home page navigation as the secondary navigation and how can I get this to work? Here is the link to the home page I am referring to.  My code in both files are <div id="access">wp_nav_menu('theme_location'  => 'primary', 'menu'            => primary_nav,  'container'       => '',  'container_class' => , 'container_id'    => ,'' 'menu_class'      => '', 'menu_id'         => 'access','depth'           => 0,);

http://sandbox.primomotif.com/obr/

thanks for the help!
0
bschave2
Asked:
bschave2
  • 3
  • 2
1 Solution
 
jrm213jrm213Commented:
<div id="access">wp_nav_menu('theme_location'  => 'primary', 'menu'            => primary_nav,  'container'       => '',  'container_class' => , 'container_id'    => ,'' 'menu_class'      => '', 'menu_id'         => 'access','depth'           => 0,);

as far as I can tell the above can't work, you are mixing html with php, and you have a comma at the end of the wp_nav_menu call that doesn't need to be there.

when you say you have 2 different templates and that the home page is static, do you mean you have home.php and page.php or that your homepage is a page saved in wordpress but has a different template selected and is set as the home page?

In either case though make sure you are calling the same header file and that the header file somewhere before </head> has <?php wp_head();?>
0
 
bschave2Author Commented:
correct. The homepage is set to a page named something other than home or page.php. I am not calling a header file on the static homepage. Does that matter?
0
 
jrm213jrm213Commented:
it doesn't technically matter, but I have seen all sorts of strange things happen when wp_head(); is not called as part of a pages header and the wordpress header.php has that in it as part of the page. You might try just putting a call to wp_head(); right before </head> in your home template.  
0
 
bschave2Author Commented:
Ok, I will try that and let you know if it fixes it.
0
 
bschave2Author Commented:
the issue was that the doc type was not put in the code and that was causing the nav not to work.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now