I have a page template that needs jQuery loaded in the header instead of the footer.
The Theme (Divi Theme) loads jQuery in the footer by default. This causes some errors, when jQuery is loaded twice.
Is there any way I can modify <?php wp_footer(); ?>
to exclude jQuery for this template?
Thanks.
Template:
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="<?php echo get_site_url(); ?>/cam-forms/styles/cam-forms.min.css" />
<script type="text/javascript" src="<?php echo get_site_url(); ?>/cam-forms/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo get_site_url(); ?>/cam-forms/js/jquery-migrate.min.js"></script>
</head>
<body>
<?php echo do_shortcode( get_field('form') ); ?>
<?php wp_footer(); ?>
</body>
</html>