Automatic menus?
-
Hi there,
Rather than having to build a custom menu, I was expecting the main menu (including sub-menus) to be created automatically from the pages and their hierarchy.
Is that not possible?
Thanks,
Mark
-
There’s a Pages widget (Dashboard > Appearance > Widgets) that shows your pages in a hierarchy. You might also consider searching for a plugin.
Thanks Stephen,
I wanted the pages to appear in the main menu space, not as a widget.
However, I’ve now found a plugin which automatically adds new sub-pages to a custom menu, so the problem’s half solved.
It’s just that most themes, if you don’t use a custom menu, will create the menu automatically from the list of pages.
Cheers,
Mark
what is plugin?
Auto submenu: http://jamocreations.com/en/artikelen/auto-submenu
Another option would be to create a child theme, copy over
header.phpto the child theme, and find these lines:<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav navbar-nav pull-left', 'depth' =>4, 'container' => false, 'fallback_cb' => false, 'walker' => new openstrap_theme_navigation() ) ); ?>Delete the lines
'fallback_cb' => falseand'walker' => new openstrap_theme_navigation()and you’ll get the automatic page menu. You would then use CSS to style the resulting menu.Thanks Stephen,
That’s useful.
Mark
The topic ‘Automatic menus?’ is closed to new replies.
