CodeLobster IDE http://codelobster.com/forum/ |
|
Why is my template not recognizig my scripts? http://codelobster.com/forum/viewtopic.php?f=3&t=23368 |
Page 1 of 1 |
Author: | alanwaston [ Thu Feb 23, 2017 4:57 am ] |
Post subject: | Why is my template not recognizig my scripts? |
Not sure if there is a WordPress forum here; I didn't see one but I hope one of you gurus can help me.(http://freeringtonesfree.mobi) I created a WordPress custom template called Contact-Us I am using AngularJS and Html to create additional input textboxes dynamically. This works great. However, when I created a WordPress template and converted the code to php, none of the scripts on my header section is being recognized. For instance, the dynamic textbox creation is no longer working. Is there something wrong with the way I am referencing the scripts? Note: I have the script in functions.php file. Here it is. Code: add_action('wp_enqueue_scripts', 'scripts_styles'); function scripts_styles(){ if(is_page_template('Contact-Us.php')){ wp_enqueue_script('jquery', get_template_directory_uri().'/js/jquery.min.js'); wp_enqueue_script('bootstrap', get_template_directory_uri().'/js/bootstrap.min.js'); wp_enqueue_script('handlebars', get_template_directory_uri().'/js/handlebars.min.js'); wp_enqueue_script('addrows', get_template_directory_uri().'/js/addrows.js'); } } Thanks in advance Relax: Click here to download free bollywood ringtones, free classical ringtones |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |