After adding it to functions.php, I get an error (white page), I have open tag php and a Closed.
& lt ;? Php add_theme_support ('Menu'); Function my-theme_add_scripts () {wp_enqueue_script ('google-map', 'https://maps.googleapis.com/maps/api/js?v=3.exp&special=false', array (), '3' , truth ); Wp_enqueue_script ('google-map-init', get_template_directory_uri (). '/js/google-maps.js', array ('google-map', 'jquery'), '0.1', true); } Add_action ('wp_enqueue_scripts', 'my-theme_add_scripts'); ? & Gt;
try function my_theme_add_scripts ()
instead of function My-theme_add_scripts ()
. You can not use -
in your function names.
No comments:
Post a Comment