Jump to content

using a php menu with subpages (wordpress)


senca99

Recommended Posts

hey everyone,

 

I am having some trouble creating a menu/submenu structure.I am trying to create a main menu and 2 submenu's under the "hybrides/morphs" page.But when I click on "hybrides/morphs",the main menu is still shown while I only want the submenu to be shown.I know the first line of code says to show the main menu,but I don't know how to not show it when on the "hybrides/morphs" page.I used the wordpress codex but I can't really find my answer there.This is the link: http://www.fictionindustries.com/tko/svensegers

This is my code:

 

code:

 

wp_list_pages('depth=1&title_li=0&sort_column=menu_order');

 

if(is_page('Hybrides/morphs')){

wp_list_pages('exclude=29,27,22,30,24,57,8,28,26');

 

}

 

I've made it work by adding:

if(is_home())  {

wp_list_pages('depth=1&title_li=0&sort_column=menu_order');

}

if(is_page('Hybrides/morphs')){

wp_list_pages('exclude=29,27,22,30,24,57,8,28,26');

 

}

 

Now I just need to figure out how to remove that annoyinh "page" at the top of the menu :s

big failure from my side...this doesn't work either.With this code,the menu disapears when clicking on a link in the main menu.If anyone can help,this would very much appreciated.

 

why do you want to remove the main default menu? just makes it harder for navigation to other parts

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.