Thread Starter
Ronnie
(@ronniesblog)
ps – i’m using the amirra theme
Anonymous User
(@anonymized-3085)
does your theme support widgets? the menu’s can also be added via a widget.
Thread Starter
Ronnie
(@ronniesblog)
thanks, thats quite cool actually.. i need them however to be on the header
Anonymous User
(@anonymized-3085)
then you’ll need to either add menu support, or a widgetable area to your theme.
Adding support for the new WP 3 menu takes very minimal effort for a theme developer – about 3 lines of code are involved, and perhaps a few CSS fixes.
Suggest you write to the theme developer and ask them to add support for WP 3 custom menus.
Thread Starter
Ronnie
(@ronniesblog)
thanks elfin
thanks wp – i tried to get in contact with the developer but no joy, they don’t make themselves contactable it seems
is the required additional code generic? like would someone else here know what/where to add?
Joey
(@joeythesquid)
There’s virtually no documentation on the new menus and no resources I could find online so we’re pretty much flying by the seat of our pants here. That said, the code to get the menu to register seems pretty straightforward. Something like this goes into functions.php:
// navigation menu
if (function_exists(‘register_nav_menu’)) {
register_nav_menu(‘primary’, __(‘Menu”));
}
Then you insert something like the following into your header:
<?php wp_nav_menu( array( ‘container_class’ => ‘menu’, ‘theme_location’ => ‘primary’ ) ); ?>
As for the CSS styling, good luck. I can’t find any reference on that at all and there’s precious few themes to tear apart for better reference. In short my blank theme, which I use for my web design projects, now supports menus but they don’t actually work. Oh well.
Joey
(@joeythesquid)
There’s virtually no documentation on the new menus and no resources I could find online so we’re pretty much flying by the seat of our pants here. That said, the code to get the menu to register seems pretty straightforward. Something like this goes into functions.php:
// navigation menu
if (function_exists(‘register_nav_menu’)) {
register_nav_menu(‘primary’, __(‘Menu”));
}
Then you insert something like the following into your header:
<?php wp_nav_menu( array( ‘container_class’ => ‘menu’, ‘theme_location’ => ‘primary’ ) ); ?>
As for the CSS styling, good luck. I can’t find any reference on that at all and there’s precious few themes to tear apart for better reference. In short my blank theme, which I use for my web design projects, now supports menus but they don’t actually work. Oh well.
Thread Starter
Ronnie
(@ronniesblog)
thanks joey i tried entering in the code you mention but i still get
“The current theme does not natively support menus, but you can use the “Custom Menu” widget to add any menus you create here to the theme’s sidebar.”
thanks chris i followed up on the links and used the examples but still the same
the codex one i can’t follow as its over my head
i’m not up on the coding
i’m hoping for the ‘custom menu’s for dummies’ quick fix
All you should need in your theme functions.php file is:
<?php
function register_my_menu() {
register_nav_menu( );
}
?>
Thread Starter
Ronnie
(@ronniesblog)
thanks.. does it need to go anywhere specific within functions.php as i tried it but lost view of the site, just got a blank white page
Not really. Put it right at the bottom after the final ?>
Thread Starter
Ronnie
(@ronniesblog)
thanks, my page is no more white . . the menus though are still not registering.. still get “The current theme does not natively support menus…..” within the ‘theme locations’ part of the menu page within wp-admin
There was an extra space in my code above between the second brackets.
Try this:
register_nav_menu();