0

I'm using the latest version of Wordpress and I have such path in my theme: theme/includes/core-functions.php. I need to make changes in core-functions.php, so naturally I want to make them in child theme. I did it, but it doesn't work - I mean my code is right, because it works when I put it in parent theme. Of course the file is already uploaded in my child theme with all the necessary folders.

I tried calling core-functions.php in my child theme via the following code but it also doesn't work:


function corefunctions_script() { wp_enqueue_script( 'coreFunctionsScript', get_stylesheet_directory_uri() . '/theme/includes/core-functions.php', array(), '1.0.0', true ); }

add_action( 'wp_enqueue_scripts', 'corefunctions_script' );

I feel like I've tried everything. It should work but it doesn't - every other file in child theme does, but not this one. Does anyone have any ideas how to make it work?

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.