Problem:
The issue here is that the user wanted know how to add a script to the header of their website.
Solution:
This is possible to do with Toolset, however you will need to wrap the script tag in one of the WordPress hooks that allow you to insert the script into the header.
You can use the hook below.
function wpb_hook_javascript() { ?> <!-- Start cookieyes banner --> <script id="cookieyes" type="text/javascript" src="https://cdn-cookieyes.com/client_data/fcec4432640d070c50f260b1/script.js"></script> <!-- End cookieyes banner --> <?php } add_action('wp_head', 'wpb_hook_javascript');
This can be added to the Toolset Custom code settings in Toolset -> Settings -> Custom Code, ensure that it is activated once you've set it up. If you want to have the code run only on the frontend then you will need to check only the frontend option.
Alternatively you can use the plugin below to add the script as well.
https://wordpress.org/plugins/insert-headers-and-footers/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)
This topic contains 2 replies, has 2 voices.
Last updated by 3 years, 2 months ago.
Assisted by: Shane.