StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-08-2010, 11:54 PM
oicurmt3's Avatar
oicurmt3 oicurmt3 is offline
Registered User
Pro Plus Member
 
Join Date: Aug 2009
Posts: 143
Default Trouble with Creating Custom Menus

This is my site:
http://sandgroper.net/demo

This is the error:
Code:
Warning:  call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'register_my_menus' was given in /home/ozscrib1/public_html/sandgroper.net/demo/wp-includes/plugin.php on line 395
This is what I added to my functions.php
Code:
// Add Custom Menus
add_action( 'init', 'register_my_menus' );

function register_my_menus() {
    register_nav_menus(
        array(
            'header-top' => __( 'Header Top' ),
            'header-bottom' => __( 'Header Bottom' ),
            'sidebar1' => __( 'Sidebar First' )
        )
    );
}
This is how I've changed (in bold) my header.php
Code:
    <div class="headerright">
        <ul id="topnav">
            <?php if (is_home()) { ?>
                <li class="current_page_item"><a href="<?php echo get_option('home'); ?>"><?php _e("Home", 'studiopress'); ?></a></li>
            <?php } else { ?>
                <li><a href="<?php echo get_option('home'); ?>"><?php _e("Home", 'studiopress'); ?></a></li>
            <?php } ?>    
            <?php wp_nav_menu(  array( 'theme_location' => 'header-top' ));  ?> 
        </ul>
    </div>
and

Code:
    <div id="navbar">
        <ul id="nav">
            <?php wp_nav_menu(  array( 'theme_location' => 'header-bottom' ));  ?> 
        </ul>
    </div>
This is how my menu backend looks



Any help greatly appreciated

Cheers Pete
__________________
I love my son more than anything else in the world.
 

Tags
custom menu, error, functions.php, header, magazine, menu

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble Creating a Page Calum General Discussion 5 04-26-2010 11:04 AM
Creating dropdown menus.. how? ardy General Discussion 9 03-08-2010 11:39 AM
Using Corporate Theme as a company website - having trouble with drop down menus! JohnLaw General Discussion 2 02-14-2010 05:09 PM
Creating static pages which don't appear on menus Andrew_Cooper General Discussion 4 12-15-2008 12:15 AM


All times are GMT -5. The time now is 05:18 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.