No functions.php necessary for childtheme after update?

Hi Sidney team

I recently updated the theme to the newest version. In order to tweak it a bit I created a childtheme and added some css and some buttonns in the footeer and some other stuff.

Unfortunately, the page does not work anymore after the update. However, if I delete the functions.php in the childtheme everything seems to be altight and I can also see the css and the other important files of the childtheme in the editor.

Therfor I would like to know if it is not necessary to use a funtions.php in order to make the childtheme work?

Here the code of the functions.php

<?php
/**
 * Sydney child functions
 *
 */

/**
 * Enqueues the parent stylesheet. Do not remove this function.
 *
 */

/** deque mainjs*/
function sydney_child_dequeue_script() {
   wp_dequeue_script('sydney-main');
}
add_action( 'wp_print_scripts', 'sydney_child_dequeue_script', 100 );

add_action( 'wp_enqueue_scripts', 'sydney_child_enqueue' );
function sydney_child_enqueue() {
    
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
//add custom main js*/
    wp_enqueue_script( 'sydney-child', get_stylesheet_directory_uri() . '/js/main-child.js', array('jquery'),'', true );

}

Thank you:-)

Nicolas

Hello Nicolas,

The functions.php file is required to be exist in child theme. Please read the codex.

The code in your child theme’s functions.php file removes the main JS file from parent theme and then calls a new (modified) one from child theme. I guess you’ve made some JS tweaks. For your information, the latest version contains main JS update. Since you alter this with your child theme’s JS, it might be the reason why your page isn’t working. Please the main theme’s JS file which is located in sydney/js/main.js. Then you should make some adjustments.

Regards,
Kharis