Thanks for your reply. The article is really helpful, thanks.
Any chance you could help me further though, my brain is struggling today….
I think I’ve registered the scripts I want and the libraries they are dependent on, but I am still getting an undefined function error.
This is what I have listed:
wp_register_script('modernizr', get_template_directory_uri() . '/assets/js/vendor/modernizr.min.js', false, null, false);
wp_register_script('kadence_plugins', get_template_directory_uri() . '/assets/js/plugins.js', false, '237', true);
wp_register_script('kadence_main', get_template_directory_uri() . '/assets/js/main.js', false, '237', true);
wp_register_script('flip-script', get_template_directory_uri() . '/assets/js/flip-script.js', array('jquery', 'jquery-ui-core', 'jquery-effects-core'), false, null);
wp_register_script('jquery-flip', get_template_directory_uri() . '/assets/js/jquery.flip.min.js', array('jquery', 'jquery-ui-core', 'jquery-effects-core'), false, null);
wp_enqueue_script('jquery-ui-core', true, false, true);
wp_enqueue_script('jquery-effects-core', true);
wp_enqueue_script('jquery-flip');
wp_enqueue_script('flip-script');
wp_enqueue_script('jquery');
wp_enqueue_script('modernizr');
wp_enqueue_script('masonry');
wp_enqueue_script('kadence_plugins');
wp_enqueue_script('kadence_main');
In the page source they are showing in the <head> section as:
<script type='text/javascript' src='https://localhost/wordpress/wp-includes/js/jquery/jquery.js?ver=1.11.1'></script>
<script type='text/javascript' src='https://localhost/wordpress/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>
<script type='text/javascript' src='https://localhost/wordpress/wp-includes/js/jquery/ui/core.min.js?ver=1.11.2'></script>
<script type='text/javascript' src='https://localhost/wordpress/wp-includes/js/jquery/ui/effect.min.js?ver=1.11.2'></script>
<script type='text/javascript' src='https://localhost/wordpress/wp-content/themes/virtue/assets/js/jquery.flip.min.js?ver=4.1'></script>
<script type='text/javascript' src='https://localhost/wordpress/wp-content/themes/virtue/assets/js/flip-script.js?ver=4.1'></script>
<script type='text/javascript' src='https://localhost/wordpress/wp-content/themes/virtue/assets/js/vendor/modernizr.min.js'></script>
Any ideas why the function is undefined, I’m getting code blindness at mo.
Thanks in advance