Thanks for the great tutorials. Why does get_template_directory_uri within filemtime give me an error and get_template_directory does not. (of course with specification of the file) Both point to the file, don't they?
Welcome. Thats because filemtime requires absolute file path as a parameter and get_template_directory_uri gives 'uri' www.php.net/manual/en/function.filemtime.php
Thanks for series. If I am using wrong function name i.e. wp_enqueque_scripts() instead of wp_enqueque_script(), I am getting internal 500 error. Why wordpress is not able to check that function name is wrong though i have already set define('WP_DEBUG', true); These mistakes can make debugging quite hard if wordpress is not able to track.
Nice tutorial, a bit hard to follow at times because of your lines of code being so long they cant really fit the screen and become hard to read. Try making a habit of breaking the lines up or formatting them =)
Just started going through these tutorials, great so far. As far as the the .js in the header I have been using the defer js in the header. From what I have been reading that is the best practice now. Just your thoughts?
I agree, downloading the script in parallel to parsing the page, and executing it after the page has finished parsing, using defer attribute definitely has a positive effect on core web vitals.
Why is this course FREE? 😒
You saved my career. Can't thank you enough, man.👍
Welcome
Thanks for great tutorial. Explanation and step by step is very clear.
Glad it was helpful!
Great work sir I'm loving it
Hi, fantastic tutorial series.
Thank u
I wish I can press like button 2 times
You can press super thanks too 😊
Thanks for the great tutorials.
Why does get_template_directory_uri within filemtime give me an error and get_template_directory does not. (of course with specification of the file)
Both point to the file, don't they?
Welcome. Thats because filemtime requires absolute file path as a parameter and get_template_directory_uri gives 'uri'
www.php.net/manual/en/function.filemtime.php
@@Codeytek Thank you!
Excellent tutorial 👍🔥🔥
Thanks for series.
If I am using wrong function name i.e. wp_enqueque_scripts() instead of wp_enqueque_script(), I am getting internal 500 error. Why wordpress is not able to check that function name is wrong though i have already set define('WP_DEBUG', true);
These mistakes can make debugging quite hard if wordpress is not able to track.
Thank you so much to share this video
Hi, in the dependencies ($deps) I see people often use array() instead of [ ] , could you please tell what's the difference, if there's one?
[] is a short syntax for array() that is only supported in PHP >= 5.4
Nice tutorial, a bit hard to follow at times because of your lines of code being so long they cant really fit the screen and become hard to read. Try making a habit of breaking the lines up or formatting them =)
hello,
Thank you so much for providing great tutorial of wordpress theme deveopment,
I've one query how to move jquery in footer?
thank you.
What an angel!
Sir plz tell me about 500 error it shows in console when the website is loaded.
Just started going through these tutorials, great so far. As far as the the .js in the header I have been using the defer js in the header. From what I have been reading that is the best practice now. Just your thoughts?
I agree, downloading the script in parallel to parsing the page, and executing it after the page has finished parsing, using defer attribute definitely has a positive effect on core web vitals.
Great content as always
Thank you
I'm like and learn this course. but can i make a theme like others theme in wordpress.
Yes u can
@@Codeytek Sir, Can you gives me tips about how to connect my codee with my git repo.?
Hey Imran what is the name of the IDE you are using to code?
PHPStorm
It doesn't work
wp_enqueue_script ( 'main-js', get_template_directory_uri() . '/assets/main.js', [], filemtime( get_template_directory() . '/assets/main.js' ), true);
It work
wp_enqueue_script ( 'main-js', get_template_directory_uri() . '/assets/main.js', [], filemtime( get_template_directory() . '/assets/main.js' ));
true doesn't work but false worked.