Is this possible to do in WordPress???
# June 8, 2009 at 2:06 am
Does anyone know if it’s possible to create 2 separate menu areas?
What I need is a main menu to appear horizontally across the top, this would lead to the main navigation links (Home, Contact, etc). These links can be dynamic or not, but they just need to be editable.
Additionally, I need to create an area on the page where it displays pages dynamically because pages will be created and removed often, and each page needs it’s own password. Because there will be like 10-15 pages like this at any given time, it makes using a sub-menu pretty bulky.
One thought I had was that possibly I can include a small box on the page that is pulling in the sub menu into it while the main menu hides the sub menu items?
Maybe I’m over complicating it and can use Posts included on one of the pages to this affect… Just seeing what can be done before I get too deep into it.# June 8, 2009 at 2:49 am"xheathen" wrote:Is this possible to do in WordPress???
ANYTHING IS POSSIBLE!!! MUAHAHAH!!!
Yes, that’s simple: wp_list_pages()
You can use that function to list pages in any spot in your theme.
You could put this code in the header to display only the three main pages (with ID of 5, 9 and 23):Code:
< ?php wp_list_pages('include=5,9,23&title_li='); ?>
Then you could put this in the sidebar to list all active pages:Code:
# June 8, 2009 at 7:21 pm
< ?php wp_list_pages('title_li=All Pages'); ?>
No it won’t. If you want to list the child pages you can specify child_of=5. If you want to have both the page and all its children you can use the following snippet:Code:< ?php $pageid = 5; // id of the page $child_pages = wp_list_pages("title_li=&echo=0&child_of=$pageid") ; echo "
You must be logged in to reply to this topic.