Solved

Wordpress 3.0 navigation issues

Posted on 2010-11-24
5
506 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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…
The viewer will learn how to count occurrences of each item in an array.

910 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

21 Experts available now in Live!

Get 1:1 Help Now