Overwriting the menu break points of twentysixteen in child theme

I am currently working on a child theme with TwentySixteen being the parent.

Currently in the functions.js file of TwentySixteen, it has a break point of 910 where the normal menu stops and the menu-toggle button displays instead.

I need to reduce the width of this down to 810 but am unsure how to do this. Obviously i dont want to touch the TwentySixteen theme files.

Topic theme-twenty-sixteen functions Wordpress javascript

Category Web


Copy the js folder of the parent TwentySixteen theme to child theme root. Then add the below code in your functions.php-

function the_dramatist_dequeue_scripts() {
    wp_dequeue_script( 'twentysixteen-script' );
    wp_deregister_script( 'twentysixteen-script' );
}
add_action( 'wp_print_scripts', 'the_dramatist_dequeue_scripts' );

function the_dramatist_twentysixteen_scripts() {
    wp_enqueue_script( 'twentysixteen-child-script', get_stylesheet_directory_uri() . '/js/functions.js', array( 'jquery' ), null, true );
}
add_action( 'wp_enqueue_scripts', 'the_dramatist_twentysixteen_scripts' );

Then in your child theme js folder (the folder you copied earlier) find the functions.js file and make your changes. It will give you the desired output.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.