Image default
Notes Wordpress Notes

Add Scripts to the HEAD – wp_head()

Add PHP to your head

// Add scripts to wp_head()
function child_theme_head_script() {

    // Your PHP goes here

}
add_action( 'wp_head', 'child_theme_head_script' );

OR

Add HTML to your head

// Add scripts to wp_head()
function child_theme_head_script() {

    echo "Your HTML goes here";

}
add_action( 'wp_head', 'child_theme_head_script' );

Code added to wp_head() will be ran just before the closing </head> tag.

 

Related posts

YII2 Classes

Die Coding

Mengenal Lebih Dekat dengan Command Prompt Windows (CMD)

Die Coding

Cara End Task Anti Malware Service Executable di Windows 10

Die Coding

Leave a Comment