Skip to content

Instantly share code, notes, and snippets.

@AndreaBarghigiani
Created June 21, 2015 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndreaBarghigiani/3f916621245cf16f1f0f to your computer and use it in GitHub Desktop.
Save AndreaBarghigiani/3f916621245cf16f1f0f to your computer and use it in GitHub Desktop.
Includere codice jQuery in WordPress
/****************************************
Da inserire all'interno del file functions.php
*****************************************/
if ( is_single( $id ) ){ //Sostituisci $id con l'ID della pagina specifica
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'mio-codice', get_template_directory_uri() . '/percorso/file.js', array( 'jquery' ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment