• Hi. Im make a theme options page and I want to add admin. menu to the page with submenu. I search around but nothings found. I cant understand how to add options page from external file. Like /includes/homepage.php or /options/settings.php etc.
    In my functions.php I put this code:

    add_menu_page ('Page Title', $themename, 8, 'mytheme_home', get_bloginfo('template_url'). '/images/set_icon.gif');
    }
        add_submenu_page('mytheme', 'General', 'General Options', 8, 'mytheme');
        add_submenu_page('mytheme', 'Portfolio','Port Options', 8, 'mytheme_port', '/includes/portfolio.php');

    With this code I has a Error message :
    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '/includes/portfolio.php' was given in /home/user/public_html/wp-includes/plugin.php on line 339
    And no matter what path to file error the same.

    Where I’m wrong? Thank you!

The topic ‘How to add sub menu.’ is closed to new replies.