Add javascript to wordpress in header.php


Add this to functions.php

function my_custom_js() {
echo ‘‘;
// Add hook for admin
add_action(‘admin_head’, ‘my_custom_js’);
// Add hook for front-end
add_action(‘wp_head’, ‘my_custom_js’);


Note: If you are unsure of the location, goto your ftp copy whole path i.e file.

Like what you read?
Do you think you have knowledge to fetch Overseas Jobs and Projects?
Register here and start posting...
The following two tabs change content below.

Embedded Design Engineer by profession .Extremly intrested in Emedded Systems,Linux and Electronics.I truely believe in open source , join me in this mission by registering .

How to Integrate Google “No CAPTCHA reCAPTCHA” on Your Website

Leave a Reply