CodeLobster IDE

Free cross-platform PHP IDE (HTML, PHP, CSS, JavaScript, Python code editor) with support Drupal, Joomla, Twig, JQuery, BackboneJS, LaravelJS, Node.js, CodeIgniter, CakePHP, Laravel, Magento, MeteorJS, Phalcon, Symfony, VueJS, WordPress, Yii
It is currently Thu Mar 28, 2024 7:12 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Why is my template not recognizig my scripts?
PostPosted: Thu Feb 23, 2017 4:57 am 
Offline

Joined: Tue Dec 06, 2016 9:48 am
Posts: 3
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 44 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2016 phpBB Group