I've put this code in g2.js file, and I've uploaded the file in atahualpa/js folder.
I'm trying to edit functions.php and I've tried to add 2 basic things:
Code:
wp_register_script ( 'g2', get_stylesheet_directory_uri() . '/js/g2.js', array( 'jquery' ), '', true ); wp_enqueue_script ( 'g2' );
Code:
add_action('g2', get_stylesheet_directory() . '/js/g2.js');
Can you please help me with this?