Show Sidebar Log in
Commons In A Box Logo
  • Home
  • About
    • Project Team
    • Logos and Graphics
  • Showcase
    • CBOX Classic Showcase
    • CBOX OpenLab Showcase
  • Demo
  • Get Started
  • Documentation
    • Technical Guide
    • CBOX Classic Guide
    • CBOX OpenLab Guide
  • Support Forums
    • CBOX Classic
    • CBOX OpenLab
    • Developers Forum
  • News

Group Admins

  • Profile picture of Scott Voth

CBOX Classic Support

Public Group active 11 months, 3 weeks ago

This group provides support for Commons In A Box Classic, our original software for community-building. Register for an account or log in to commonsinabox.org, then join the group and post your question here.

Changing Main Menu in Child Theme

Tagged: main-menu, theming

  • This topic has 2 replies, 2 voices, and was last updated 10 years ago by Daniel Jones.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 13, 2013 at 3:01 pm #2210
    Daniel Jones
    Participant

    Hey all!

    Firstly, I’m really sorry if it turns out that this is just a wordpress question and not a CBOX question.

    My question is about how to control what pages show up as links in the “main menu” in the header of the CBOX theme (I’m running a very lightly customized child theme). Basically, I want to be able to hide/exclude some of my pages because they mess up my layout. From following the template files, it looks like those links are being generated by the command “infinity_base_nav_menu( ‘main-menu’ )” in main-menu.php (in templates/parts), which is referenced by header-banner.php (also in templates/parts), which is referenced by header.php (in the theme’s root directory).

    I have a feeling that even if I could find infinity_base_nav_menu(), I really wouldn’t want to edit it…so does anyone know where it’s pulling ‘main-menu’ from and how I can choose which pages do and don’t show up in it? I looked around in the different options on my admin page but couldn’t find anything- just an option to edit cbox-sub-menu, which seems like it definitely is not main-menu.

    Any help would be greatly appreciated!
    Dan

    March 13, 2013 at 5:25 pm #2217
    Ray
    Keymaster

    Appreciate you looking through the codebase! However the menu is simply using the WordPress Menu system.

    1. Login to the WP dashboard
    2. Navigate to “Appearance > Menus”
    3. Customize the menus to your heart’s content!

    Let me know if this is what you meant.

    March 14, 2013 at 1:26 am #2219
    Daniel Jones
    Participant

    Thanks for the reply, Ray!

    I’ve been messing around some with the Menus page in my admin panel, as well as a forked main-menu.php in my child theme, with some weird-seeming results.

    First, though- it doesn’t look like ‘main-menu’ exists at all for my Menus admin panel, just ‘cbox-sub-menu’, which has a different set of links from whatever ‘main-menu’ is. Do you have a sense of where it might be getting defined/populated with links?

    Here’s what I’ve done so far:
    1. When I comment out the “infinity_base_nav_menu( ‘main-menu’ );” line entirely, the menu disappears, as expected.
    2. I created a new menu through the admin interface, which I called ‘mod-main-menu’, and replaced ‘main-menu’ with ‘mod-main-menu’ in the command above: no effect
    3. I replaced ‘main-menu’ with ‘bleh’ (which I hadn’t created as a menu- was just testing a random string): also no effect
    4. I removed the string argument from the command entirely (‘infinity_base_nav_menu()’), which changed the menu into the one defined by ‘cbox-sub-menu’ in my admin panel- that seemed especially weird, but makes sense if that’s defined as the default, but then doesn’t because a random string didn’t return it but the same thing as ‘main-menu’
    5. I set the menu for ‘Inside Header’ to my ‘mod-main-menu’ using the admin interface: no effect

    At this point I’m also really curious to see the code inside of infinity_base_nav_menu(): do you know where it’s defined?

    Any thoughts/recommendations would be greatly appreciated!
    Dan

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In
Group logo of CBOX Classic Support
  • Home
  • Forum
  • Announcements
  • Docs
  • Members 274

Groups

Newest | Active | Popular | Alphabetical
  • Group logo of CBOX Classic Support
    CBOX Classic Support
    274 members
  • Group logo of CBOX Pioneers
    CBOX Pioneers
    71 members
  • Group logo of CBOX Developers
    CBOX Developers
    40 members
  • Group logo of CBOX OpenLab Support
    CBOX OpenLab Support
    22 members
  • Group logo of CBOX-OL Testing Partners
    CBOX-OL Testing Partners
    12 members

CBOX has its roots in the CUNY Academic Commons, which in turn was made possible through funding from The City University of New York itself.

CUNY Logo

CUNY Academic Commons Logo

City Tech logo

The Commons In A Box was made possible through the generous support of the Alfred P. Sloan Foundation.

Alfred P. Sloan Foundation Logo

NEH Logo

The CUNY Graduate Center has directly contributed to the CUNY Academic Commons, housing the project since its inception, and has contributed to CBOX through its GC Digital Initiatives.

CUNY Graduate Center Logo

CUNY Graduate Center Digital Initiatives Logo

Powered by Commons In A Box
css.php
Skip to toolbar
  • About WordPress
    • WordPress.org
    • Documentation
    • Support
    • Feedback
  • Log In
  • Register