How to use parent theme’s enqueue methods

If the desired functions are in the parent theme’s functions.php then you can include them in your currently executing child theme functions.php with this call:

include( get_template_directory() . '/functions.php');

get_template_directory() finds the parent’s directory even when using a child theme.

Note that this will run everything found to be executable in the parent theme’s functions.php. So whatever it does, it will do when you pull it in.

If there are things in the parent’s functions.php that are enqueued that you don’t want you can always dequeue them ( after the call to get_template_directory() ) in the child’s functions.php with the appropriate dequeue function: wp_dequeue_script() or wp_dequeue_style()

Leave a Comment