Support » Theme: Openstrap » Automatic menus?

  • Resolved 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?



Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator stephencottontail


    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.



    what is plugin?

    Moderator stephencottontail


    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.

    Thanks Stephen,

    That’s useful.


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