• Hi all,
    I have created a child of html5 blank theme in localhost with xampp.
    In the functions.php folder is:

    <?php
    function html5blankstablechild_scripts() {
    wp_enqueue_style( ‘html5blank-stable-child-style’, get_stylesheet_uri() );
    wp_enqueue_script( ‘html5blank-stable-child-hd.jquery’, get_template_directory_uri() . ‘/js/hd.jquery.js’);
    wp_enqueue_script( ‘html5blank-stable-child-jquery.easing.1.3’, get_template_directory_uri() . ‘/js/jquery.easing.1.3.js’);
    wp_enqueue_script( ‘html5blank-stable-child-jquery.prettyPhoto’, get_template_directory_uri() . ‘/js/jquery.prettyPhoto.js’);
    wp_enqueue_script( ‘html5blank-stable-child-jquery-1.6.1.min’, get_template_directory_uri() . ‘/js/jquery-1.6.1.min.js’);
    wp_enqueue_script( ‘html5blank-stable-child-layers’, get_template_directory_uri() . ‘/js/layers.js’);
    wp_enqueue_script( ‘html5blank-stable-child-tooltips’, get_template_directory_uri() . ‘/js/tooltips.js’);
    }
    add_action( ‘wp_enqueue_scripts’, ‘html5blank-stable-child_scripts’ );

    When I view the site I get the following error message:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘html5blank-stable-child_scripts’ not found or invalid function name in C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php on line 286

    On the above mentioned line of C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php is:

    $value = call_user_func_array( $the_[‘function’], $args );

    I have no coding experience and would appreciate anyone helping me to resolve this issue.
    Many thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • this my question too!

    Hi @akasa1965
    Hope you are doing great.

    I can see you are making a mistake with the name of your handler:
    Your method is called “html5blankstablechild_scripts” and your hook is setting the callback to “html5blank-stable-child_scripts”

    Changing it to this should solve the problem:
    add_action( ‘wp_enqueue_scripts’, ‘html5blankstablechild_scripts’ );

    Please let me know if that works.
    Cheers

    • This reply was modified 7 years, 5 months ago by Santiago.
    Thread Starter akasa1965

    (@akasa1965)

    Hi sjaure,
    Thank you so much, this immediately solved my issue thanks for the speedy reply and good wishes.
    All the very best to you.
    Thanks again

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Warning: call_user_func_array() expects parameter 1 to be a valid callback, func’ is closed to new replies.