- Microlancer Beta Tester
- Envato Staff
- Support Staff
- Has been a member for 6-7 years
- Attended a Community Meetup
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Interviewed on the Envato Notes blog
Hey guys, I hope you are well.
I’m reading Rockstar Wordpress Designer and I’m pretty confused about the following thing.
I have already replaced all the urls with <?php bloginfo(‘url’); ?> Also, I have updated the head including trackbacks, favicon image, space for plugins (<?php wp_head(); ?>) etc.
ok, now I need to add the following lines within functions.php
add_theme_support( ‘menus’ );
if(function_exists(‘register_nav_menu’)): register_nav_menu( ‘primary_nav’, ‘Primary Navigation’); endif;
to get this http://cl.ly/755ce196113bbb55651a
but I’m getting this http://cl.ly/32477e50984a9c60b34c and this http://cl.ly/c946b353cc1bdcd81172
I’m using kubrick default theme but I don’t really know if I should use the default theme from 3.0.1 version.
Thanks a lot.
register_nav_menus( array(
'primary' => __( 'Primary Navigation', 'Your Theme' ),
) );
You can also remove:
add_theme_support( ‘menus’ );
as register_nav_menus automatically makes wp3 menus available.
- Microlancer Beta Tester
- Envato Staff
- Support Staff
- Has been a member for 6-7 years
- Attended a Community Meetup
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Interviewed on the Envato Notes blog
Try using an array when using register navmenus…register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'Your Theme' ), ) );You can also remove:
add_theme_support( ‘menus’ );as register_nav_menus automatically makes wp3 menus available.
Thanks for your help mediasocket, can’t get into Theme Location yet, is it because I’m using the kubrick theme? Should I use the default Twenty Ten from 3.0.1 version?
Thanks a lot
add_action( 'init', 'register_menus' );
function register_menus() {
register_nav_menu( 'primary-nav', 'Primary Navigation' );
}

- Microlancer Beta Tester
- Envato Staff
- Support Staff
- Has been a member for 6-7 years
- Attended a Community Meetup
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Interviewed on the Envato Notes blog
Try this:add_action( 'init', 'register_menus' ); function register_menus() { register_nav_menu( 'primary-nav', 'Primary Navigation' ); }![]()
ummm still the same 
The theme location is created when you add the menu to the header.php or wherever.
For example:
<?php wp_nav_menu( array('theme_location' =?> 'primary' ) ); ?>
Edit: Ignore the ? in between = and >.
From the coloring of your code I could tell, that you haven’t placed your functions inside <?php ?> tags 
- Microlancer Beta Tester
- Envato Staff
- Support Staff
- Has been a member for 6-7 years
- Attended a Community Meetup
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Interviewed on the Envato Notes blog
thanks for the help guys! It’s fixed! =D Have a nice weekend!
