senca99 Posted January 12, 2010 Share Posted January 12, 2010 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'); } Link to comment https://forums.phpfreaks.com/topic/188190-using-a-php-menu-with-subpages-wordpress/ Share on other sites More sharing options...
senca99 Posted January 12, 2010 Author Share Posted January 12, 2010 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 Link to comment https://forums.phpfreaks.com/topic/188190-using-a-php-menu-with-subpages-wordpress/#findComment-993533 Share on other sites More sharing options...
senca99 Posted January 12, 2010 Author Share Posted January 12, 2010 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. Link to comment https://forums.phpfreaks.com/topic/188190-using-a-php-menu-with-subpages-wordpress/#findComment-993579 Share on other sites More sharing options...
RaythMistwalker Posted January 12, 2010 Share Posted January 12, 2010 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 Link to comment https://forums.phpfreaks.com/topic/188190-using-a-php-menu-with-subpages-wordpress/#findComment-993588 Share on other sites More sharing options...
senca99 Posted January 12, 2010 Author Share Posted January 12, 2010 because the menu has to change into new links of the elevant page.Like when clicking on taxonomie,the menu should change to the main specieslinks and a home link. Link to comment https://forums.phpfreaks.com/topic/188190-using-a-php-menu-with-subpages-wordpress/#findComment-993590 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.