CodeLobster IDE http://codelobster.com/forum/ |
|
Why is my template not recognizig my scripts? http://codelobster.com/forum/viewtopic.php?f=3&t=24447 |
Page 1 of 3 |
Author: | nguyenhaongnam [ Sun Oct 28, 2018 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. 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 |
Author: | Admin [ Mon Oct 29, 2018 1:33 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Hi. 1. It’s important to namespace your functions with your theme name. Use yourthemename_scripts_styles add_action('wp_enqueue_scripts', 'yourthemename_scripts_styles'); function yourthemename_scripts_styles(){ ... } 2. if you create a child theme than use get_stylesheet_directory_uri() instead of get_template_directory_uri() Regards, Codelobster Team. |
Author: | arnego2 [ Fri Mar 22, 2019 10:18 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Admin Wrote: 1. It’s important to namespace your functions with your theme name. Use yourthemename_scripts_styles add_action('wp_enqueue_scripts', 'yourthemename_scripts_styles'); function yourthemename_scripts_styles(){ ... } 2. if you create a child theme than use get_stylesheet_directory_uri() instead of get_template_directory_uri() Somehow my codelopster php cannot download wordpress. I stuck in the first loop Error message says cannot download wordpress. Any help is highly appreciated. |
Author: | EdwardMac [ Sat Mar 23, 2019 3:50 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Same thing happened to me when I tried downloading Wordpress. Is there an issue with certain Wordpress versions or something? |
Author: | Admin [ Sun Mar 24, 2019 1:11 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Hi, EdwardMac. 1) Do You use latest version 1.5.1? 2) Are you able to install any other framework, for example CakePHP. Thanks, Codelobster Team. |
Author: | arnego2 [ Mon Mar 25, 2019 12:53 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Admin Wrote: Hi, EdwardMac. 1) Do You use latest version 1.5.1? 2) Are you able to install any other framework, for example CakePHP. Thanks, Codelobster Team. Nice to see an Admin working on sundays I have the pro version 1.5.1 and when trying to open a project such as CakePHP it says Quote: Cannot create CakePHP project because error: Critical error: Setup CakePHP error https://imgur.com/br8GUMv |
Author: | Admin [ Mon Mar 25, 2019 3:22 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Hi. What OS do You use exactly? And what PHP version do You have? Thanks, Codelobster Team. |
Author: | arnego2 [ Mon Mar 25, 2019 6:49 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Admin Wrote: Hi. What OS do You use exactly? And what PHP version do You have? Thanks, Codelobster Team. The Pro version 1.5.1 in Mint Linux 18.3. PHP 7.0 plus my codelopster php cannot download wordpress. I stuck in the first loop Error message says cannot download wordpress. The project is in opt/lampp/htdos/xxxxx |
Author: | Admin [ Tue Mar 26, 2019 7:37 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Hi. 1) Does the following folder exist on your PC: /home/your_user_name/.local/share/CodelobsterIDE ? 2) Does in contain wptmp.zip ? 3) Please, try to set the following values: Location: /opt/lampp/htdocs/ Project name: xxxxx 4) Please, check "URL for the project" in the Advanced section. It should be something like "http://localhost/xxxxx" 5) Please, check "Database Host". May be it should be 127.0.0.1 instead of "localhost". Thanks, Codelobster Team. |
Author: | arnego2 [ Sat Mar 30, 2019 2:40 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Admin Wrote: Hi. 1) Does the following folder exist on your PC: /home/your_user_name/.local/share/CodelobsterIDE ? 2) Does in contain wptmp.zip ? 3) Please, try to set the following values: Location: /opt/lampp/htdocs/ Project name: xxxxx 4) Please, check "URL for the project" in the Advanced section. It should be something like "http://localhost/xxxxx" 5) Please, check "Database Host". May be it should be 127.0.0.1 instead of "localhost". Thanks, Codelobster Team. Hi there Thanks for your help. Point 2 yes there is. The project cannot be created in lampp due to a permision I think. I have to find a way to give codelobster rights in opt. So I changed the project folder to username/sites/projectfolder and got the same message. Cannot create WordPress project because error: Critical error: Cannot download wordpress The URL says: "http://localhost//xxxxx and changed to "http://localhost/xxxxx it still has the same outcome. Does odelobster try to download WP? Why if it is already in .local/share/codelobster? thx P.D. last try with changed permisions and codelobster is in the 2nd hour not finishing the project's intake. |
Author: | Admin [ Sun Mar 31, 2019 6:13 am ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Hi. Are You able to provide us with access to your PC via TeamViewer? We will look at the problem. Many thanks, Codelobster Team. |
Author: | arnego2 [ Mon Apr 01, 2019 1:55 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Admin Wrote: Hi. Are You able to provide us with access to your PC via TeamViewer? We will look at the problem. Many thanks, Codelobster Team. Not really 1rst I'm on Linux, to install teamviewer there is a lot to do to make it work. Easier is just telling me what to do. Give me a sample how to set up the WP Wizzard, we believe it could well be our configuration as the same problems (error messages) pop up on Windows. Our questions are: Do I have to create a folder with files or without? Do I have to have a MySQL Database ready? Username with privileges set up (which we have) Does the database have to have the name wp? (we tried both ways no luck) Which spaces we leave blank? In setting for debugger I get a Web server not found. BR The same Error message on Linux and Windows: Cannot create WordPress project because error: Critical error: Cannot execute installation script Check you project url That means we have gone past the MySql part. Where can I adjust the proper path for the existent WP zip file? /home/your_user_name/.local/share/CodelobsterIDE funny is that the wp zipfile is absent. |
Author: | Admin [ Tue Apr 02, 2019 2:11 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Hi. What is the value of your virtual folder? It should be something like this (without project name): /opt/lampp/htdocs And did You try "Database Host"=127.0.0.1 instead of "localhost"? Thanks, Codelobster Team. |
Author: | arnego2 [ Thu Apr 04, 2019 7:10 pm ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Admin Wrote: Hi. What is the value of your virtual folder? It should be something like this (without project name): /opt/lampp/htdocs And did You try "Database Host"=127.0.0.1 instead of "localhost"? Thanks, Codelobster Team. Hi there /opt/lampp/htdocs yes permision set to 777 I also tried it with a user folder like docs/sites/project, same result. I changed Database Host"=127.0.0.1 to 127.0.0.1 We did it in Linux and in windows and get the same error message (Cannot download wordpress) In linux we placed the wptmp.zip into the opt/lampp/htdocs/project folder with the same result: error message (Cannot download wordpress) So tell me Do we have to create a folder with files or without? Do we have to have a MySQL Database ready? Username with privileges set up (which we have) Does the database have to have the name wp? (we tried both ways no luck) Which spaces we leave blank? Wordpress does not work with Windows nor in Linux, suspecting a misleading path |
Author: | Admin [ Fri Apr 05, 2019 8:30 am ] |
Post subject: | Re: Why is my template not recognizig my scripts? |
Hi. Let's try to resolve one problem at first. You describe several errors. 1) Do You use Linux or Windows OS? 2) Do You try to install CakePHP or Wordpress? 3) What error do You get: Code: Cannot create CakePHP project because error: Critical error: Setup CakePHP error or Code: Cannot download wordpress They are different problems. 4) What are your last values while project creating? "Virtual folder" should be without project folder. And, please, try to enter some new project name. 5) Windows setting should be something like: Virtual folder C:\xampp\htdocs Project name xxxx URL for project http://localhost/xxxx/ Thanks, Codelobster Team. |
Page 1 of 3 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |