Custom Menu in Wordpress [closed]
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
开发者_如何学GoClosed 9 years ago.
Improve this questionIm using wordpress 3.0.1 version. My current theme 2010. I had my own theme,i want to create a custom menu for that theme. Can any one give me the code for files in theme
My first instinct was to tell you to go Google this. But here's a great tutorial to get you started.
Basically, you have to do the following:
Register the custom menu
add_action('init', 'register_custom_menu');
function register_custom_menu() {
register_nav_menu('custom_menu', __('Custom Menu'));
}
Tell your header.php
file to use the custom menu
<?php wp_nav_menu(array('menu' => 'custom_menu')); ?>
Define your custom menu in the UI
Go to Appearance » Menus to create and customize a new menu.
精彩评论