Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

I just dont get it

Featured Replies

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 by mteam

  • Author

I'm guessing you can only use this as a custom menu on the sidebar (I'm an Effing dummy at times)

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.

  • 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

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 by teodora

  • Author

Thanks teodora went through all that last night.

 

No worries I'll just delete wp like I always do

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.