jQuery.accordion isn’t a function even when enqueued
The 3rd parameter in the call to wp_register_script() should be an array of dependencies – not a string. Change this: wp_register_script(‘fl-custom-js’, get_template_directory_uri() . ‘/faq/faq.js’, ‘jquery-ui-accordion’, ”, true); To: wp_register_script(‘fl-custom-js’, get_template_directory_uri() . ‘/faq/faq.js’, array(‘jquery-ui-accordion’), ”, true);