Support » Theme: SKT White » Responsive menu going crazy

  • Resolved Sennerstad

    (@sennerstad)


    I have encountered an issue where the menu on toggle open it expands a bit for then to quickly collapse. Everything happens in the same action.

    What i think is the problem is my child-theme and the copy of js folder. I have run a dequeue script for custom.js in functions.php which looks like this:

    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_custom_js’, 100 );
    function theme_enqueue_custom_js()
    {
    wp_dequeue_script( ‘parent_theme_script_handle’ );
    wp_deregister_script( ‘parent_theme_script_handle’ );
    wp_enqueue_script( ‘child_theme_script_handle’, get_stylesheet_directory_uri() . ‘/js/custom.js’, array( ‘jquery’ ) );
    }

    The script thou seems to be running simultaneously, on both themes.

    Any tip?

Viewing 1 replies (of 1 total)
  • Hi Sennerstad,

    It maybe helpful to review the information on creating your child theme here: https://codex.wordpress.org/Child_Themes

    Generally, only two files should be present in your child theme the style.css and the functions.php. The only thing in the functions.php of the child theme should be the loading of the child theme style sheet. Quote: Currently, “Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php.”

Viewing 1 replies (of 1 total)
  • The topic ‘Responsive menu going crazy’ is closed to new replies.