• Resolved berthelemy

    (@berthelemy)


    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • There’s a Pages widget (Dashboard > Appearance > Widgets) that shows your pages in a hierarchy. You might also consider searching for a plugin.

    Thread Starter berthelemy

    (@berthelemy)

    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?

    Thread Starter berthelemy

    (@berthelemy)

    Another option would be to create a child theme, copy over header.php to 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' => false and 'walker' => new openstrap_theme_navigation() and you’ll get the automatic page menu. You would then use CSS to style the resulting menu.

    Thread Starter berthelemy

    (@berthelemy)

    Thanks Stephen,

    That’s useful.

    Mark

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Automatic menus?’ is closed to new replies.