?
Solved

Wordpress 3.0 navigation issues

Posted on 2010-11-24
5
Medium Priority
?
523 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

771 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