Solved

Wordpress 3.0 navigation issues

Posted on 2010-11-24
5
499 Views
Last Modified: 2012-05-10
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
Comment
Question by:bschave2
  • 3
  • 2
5 Comments
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 34206205
<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
 

Author Comment

by:bschave2
ID: 34206555
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
 
LVL 17

Accepted Solution

by:
jrm213jrm213 earned 500 total points
ID: 34206597
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
 

Author Comment

by:bschave2
ID: 34206691
Ok, I will try that and let you know if it fixes it.
0
 

Author Comment

by:bschave2
ID: 34270365
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now