June 4, 201313 yr Everytime I think i'll have another look at wordpress I can't even get it to do the most simple things I've got the bones theme installed all I'm trying to do is activate the menu out of the appearance tab I enter a new menu name drag a couple of pages in choose it as main menu and save doesn't seem to change anything I am correct in thinking this is for the nav? I seriously hate wp Edited June 4, 201313 yr by mteam
June 4, 201313 yr Author I'm guessing you can only use this as a custom menu on the sidebar (I'm an Effing dummy at times)
June 5, 201313 yr I am not sure how Bones works, but on top of what you have done, you need to call the menu in your header.php or wherever you need it to show. http://codex.wordpress.org/Function_Reference/wp_nav_menu
June 5, 201313 yr I think that the bones theme has a few predefined wp_nav areas. So in the menus, select the menu that you have created and then on the left you should see a box labeled "Theme Locations", in there select the location from the drop-down list. if that box doesn't show or if the theme locations are blank you will have to create it.
June 5, 201313 yr Author Cheers Teodora, Funsella Looking at the code should work header.php <nav role="navigation"> <?php bones_main_nav(); ?> </nav> functions.php // wp menus add_theme_support( 'menus' ); // registering wp3+ menus register_nav_menus( array( 'main-nav' => __( 'The Main Menu', 'bonestheme' ), // main nav in header 'footer-links' => __( 'Footer Links', 'bonestheme' ) // secondary nav in footer ) bones.php /********************* MENUS & NAVIGATION *********************/ // the main menu function bones_main_nav() { // display the wp3 menu if available wp_nav_menu(array( 'container' => false, // remove nav container 'container_class' => 'menu clearfix', // class of container (should you choose to use it) 'menu' => __( 'The Main Menu', 'bonestheme' ), // nav name 'menu_class' => 'nav top-nav clearfix', // adding custom nav class 'theme_location' => 'main-nav', // where it's located in the theme 'before' => '', // before the menu 'after' => '', // after the menu 'link_before' => '', // before each link 'link_after' => '', // after each link 'depth' => 0, // limit the depth of the nav 'fallback_cb' => 'bones_main_nav_fallback' // fallback function )); } /* end bones main nav */ // the footer menu (should you choose to use one) function bones_footer_links() { // display the wp3 menu if available wp_nav_menu(array( 'container' => '', // remove nav container 'container_class' => 'footer-links clearfix', // class of container (should you choose to use it) 'menu' => __( 'Footer Links', 'bonestheme' ), // nav name 'menu_class' => 'nav footer-nav clearfix', // adding custom nav class 'theme_location' => 'footer-links', // where it's located in the theme 'before' => '', // before the menu 'after' => '', // after the menu 'link_before' => '', // before each link 'link_after' => '', // after each link 'depth' => 0, // limit the depth of the nav 'fallback_cb' => 'bones_footer_links_fallback' // fallback function )); } /* end bones footer link */ // this is the fallback for header menu function bones_main_nav_fallback() { wp_page_menu( array( 'show_home' => true, 'menu_class' => 'nav top-nav clearfix', // adding custom nav class 'include' => '', 'exclude' => '', 'echo' => true, 'link_before' => '', // before each link 'link_after' => '' // after each link ) ); } // this is the fallback for footer menu function bones_footer_links_fallback() { /* you can put a default here if you like */ } Box labeled Theme locations chose the main menu doesn't change anything I lose the will to live everytime i look at wordpress
June 5, 201313 yr Hmmm, what will happen if try to call the main menu in the header, like this: <?php wp_nav_menu( array('menu' => 'The Main Menu' )); ?> Edited June 5, 201313 yr by teodora
June 5, 201313 yr There was a topic about similar problem with wp menus just recently and I think it was solved. I will try to find it Edit: I didn't find it, but found this for you, it might help https://github.com/eddiemachado/bones/issues/98 Edited June 5, 201313 yr by teodora
June 5, 201313 yr Author Thanks teodora went through all that last night. No worries I'll just delete wp like I always do
June 10, 201313 yr I always run into problems when using themes I haven't created myself. The more popular themes usually have support forums and the like otherwise you can contact them drectly with questions (usually takes a bit longer for a response.) Bones seems to have a fairly extensive FAQ page:http://themble.com/docs/ Otherwise, I suspect that you just need to call the menu on the page you want it displayed. Or in header.php (all pages) <?php wp_nav_menu(array('container' => false, 'theme_location' => 'primary')); ?> will display the main menu in either of these locations.
Create an account or sign in to comment