Support » Themes and Templates » register_my_menus warning

  • Resolved 1timothy412


    I just transferred a WP site that I am building to the localhost of my new computer. Everything was working fine on my old computer, but now I am receiving this warning message:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'register_my_menus' not found or invalid function name in C:\xampp\htdocs\j--------i\wordpress\wp-includes\plugin.php on line 406

    Here’s line 406 from plugin.php:
    call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));

    Also, further down the page, I see this warning:
    Warning: Missing argument 1 for ResponsiveColumnWidgets(), called in C:\xampp\htdocs\j--------i\wordpress\wp-content\themes\blankslate\footer.php on line 5 and defined in C:\xampp\htdocs\j--------i\wordpress\wp-content\plugins\responsive-column-widgets\responsive-column-widgets.php on line 137

    Here’s footer.php line 5:
    <div id="footer-widgets"><?php ResponsiveColumnWidgets(); ?></div>

    And here’s resonsive-column-widgets.php line 137:
    function ResponsiveColumnWidgets( $arrParams ) {

    I know very little of PHP so I would really appreciate help. Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • esmi


    Forum Moderator

    You have an issue in your theme. Where did you download it from?

    I downloaded it from the WP directory. It is the theme “Blankslate.”



    Forum Moderator

    Re-upload a fresh, unpacked, copy of the theme’s folder to wp-content/themes using FTP or whatever file management application your host provides.

    Most of these errors pertain to Responsive actually, not BlankSlate.

    Not sure how you’re getting mixed theme errors? Are you using some sort of error checking plugin or otherwise mixing and matching the themes?

    You’re definitely doing something unique and custom here which would be good for us to know the specifics on.


    I am using BlankSlate as the theme, and am using a plugin called Responsive Column Widgets (from the WP directory) in the footer. Also, I added more menus to the theme myself (but that was working just fine before today).

    I did upgrade the Responsive Column Widgets plugin just the other day, but when I deactivated it to see if it was causing the problem, both of the warnings persisted.

    Here’s the code from the functions.php file about the menus:

    if ( ! isset( $content_width ) ) $content_width = 640;
    array( 'main-menu' => __( 'Main Menu', 'blankslate' ),
           'extra-menu' => __( 'Extra Menu' ),
           'extra-menu2' => __( 'Extra Menu 2' ),
    add_action( 'init', 'register_my_menus' );

    This is only the second time that I’ve added menus to a theme, and as I said before, I am not super familiar with PHP. So I’m not sure how to figure out what’s causing the problem.



    Forum Moderator

    Can you replicate the problem using the default 2012 theme with all plugins deactivated?



    Font hero

    function 'register_my_menus' not found or invalid function name

    So that’s a typo there, right? ‘register_my_menus’


    add_action( 'init', 'register_my_menus' );

    should be that there is actually a function name ‘register_my_menus’

    In that case, we offer a starter theme built on the same code as BlankSlate, but with examples of multiple menus, widget areas and a good starter grid to help you get a kick-start on learning:

    Hi everyone, thanks for your help. I ended up replacing my my functions.php file with the original code from BlankSlate. Then I added my menu function according to the codex: It appears to be working fine now (no warning anymore), and so I’m thinking that I did something wrong the first time I added the menus.

    However, I’m still having a problem with the warning regarding the plugin Responsive Column Widgets. With all the troubleshooting I did I believe its unrelated to the first problem, so I think I’ll post about it on the plugin support forum.

    Again, thanks so much for your questions and suggestions that helped me figure out what was going on.

    You’re welcome. Good luck with the project.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘register_my_menus warning’ is closed to new replies.