Adding JavaScript snippet but doesn’t work
-
Hi,
Here is the code I need to add to above the closing tag </head>:
<script src="https://cdn.gravitec.net/storage/xxx/client.js" async></script>
However, after adding the code below, nothing works.
add_action( 'wp_head', function () { ?> <script> /* write your JavaScript code here */ <script src="https://cdn.gravitec.net/storage/xxx/client.js" async></script> </script> <?php } );
- This topic was modified 3 years, 4 months ago by .
- This topic was modified 3 years, 4 months ago by .
- This topic was modified 3 years, 4 months ago by .
- This topic was modified 3 years, 4 months ago by .
- This topic was modified 3 years, 4 months ago by .
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Adding JavaScript snippet but doesn’t work’ is closed to new replies.