Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_action( 'wp_enqueue_scripts', 'my_custom_script_load' );
function my_custom_script_load(){
wp_enqueue_script( 'my-custom-script', get_stylesheet_directory_uri() . '/custom-scripts', array( 'jquery' ) );
}
add_action( 'wp_enqueue_scripts', 'my_custom_script_load' );
function my_custom_script_load(){
wp_enqueue_script( 'my-custom-script', plugin_dir_url( __FILE__ ) . '/custom-scripts', array( 'jquery' ) );
}
<?php
/**
Plugin Name: Header Scripts
*/
add_action( 'wp_head', 'my_header_scripts' );
function my_header_scripts(){
?>
<script>alert( 'Hi Roy' ); </script>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.