I've been handed a WordPress (WP) site from a 3rd party. I work with Drupal, so I'm not well-rounded in WP.
That said, I'm attempting to install Google Tag Manager (GTM). However, I'm getting console errors, stating that JQuery is not defined. I've discovered that JQuery is defined in the <footer>
, not the <head>
. I've had this issue in the past with Drupal, but I'm not sure where to begin with WP.
After looking at the template, I've discovered that there is a <?php wp_head(); ?>
tag in the head and there is a <?php wp_footer(); ?>
tag in the footer. Both tags inject scripts, but obviously, JQuery is injected through the footer tag. From what I can tell, the scripts are compiled in the script-loader.php document, but the document is a little overwhelming. I'm not exactly sure what to move around in order to get JQuery injected through the <?php wp_head(); ?>
tag.
I've uploaded the script-loader.php document to Google Drive. I'll put it into a .txt file so that it's readable within GDrive.
Please let me know if there's anything else I can provide. Any helpful feedback is appreciated!