Nice video, thanks a lot! I'd add, that you can also do this using wp_register_script() function. Description: Register a new script. Registers a script to be enqueued later using the wp_enqueue_script() function
Your tutorial is excellent. It really helped me to understand this topic. Thank goodness you made this video - it's the best on this topic of Javascript & Wordpress.
Basic question: if I know how to JavaScript, why do I need the basic WP theme at all? Wouldn't it make more sense for me to code the website from scratch? This is something I'm not getting...
Hi, nice tutorial, I am kind of new in this, I did everything you said but nothing happen. Silly question: do I have to add any jQuery file to my wordpress?
PLEASE HELP I turned a CSS, Java and html website into a wordpress theme but i was only able to convert css and the html. I tried to add this into my function folder the same way you did but the java script is just not working not even alerts, every thing is right but it just doesn't work even though the website still loads.
What extention did u used in your editor for the function name which was shown in your display when u wrote e few words and the whole function name has shown?
how should I do if I want to add js to just specific one page? I think your code will add javascript file to all my wordpress pages but I want to add my javascript file just on a specific wordpress page
Thank you for sharing this! I was having errors when I added a version for some reason, but it worked after I replaced the version with empty parentheses ''. If anyone can explain the reason why the version number could have interfered with the scripts.js file connecting correctly to my functions.php and header.php file, I'd love to hear your insights.
No sorry, I fixed it, but the jQuery script won't work, although it works in a normal HTML as I tried with JSFiddle, so must be a wordpress related problem...
I checked my page source and the script is not there... function nav_script () { wp_enqueue_script( 'script', get_stylesheet_directory_uri() .'/js/script.js', array('jQuery'), '1.0.0', false); } add_action('wp_enqueue_scripts', 'nav_script'); I can't spot any error....
I didn't have a js folder in my theme folder, I had to add it. but it's working now...this helps!! thanks!!
I’m glad it worked!! 👍
THIS is the proper way to add Javascript.
Thank you!
thanks for this tutorial. and like the way you make videos. 😄
Thank you !
Thank you sooo mucu sir!! I needed as am working on a WordPress theme and I have like 5% Javascript to incorporate. Thank you
You welcome!
Nice video, thanks a lot! I'd add, that you can also do this using wp_register_script() function.
Description: Register a new script. Registers a script to be enqueued later using the wp_enqueue_script() function
Thank you!!
Your tutorial is excellent. It really helped me to understand this topic. Thank goodness you made this video - it's the best on this topic of Javascript & Wordpress.
Thank you for saying that!
It works well for me. Your video saved my life in the company. Thank you so much for the excellent explanation.
That's great!! You welcome.
Thanks man, you helped a bunch!
You are welcome!
Well done and thank you for this tutorial, but how do you make the js trigger at the end of loading a page or a plugin such as a forum?
You can use the “load event”. Search for it.
i'll be back when I understand it better.
Thank you very much!!!
You welcome!
Thanks J - Hours of searching just finished with this cool tutorial! :)
You welcome!
How to call jQuery library to functions.php
Thanks a lot !!
Great.. 👍
Apparently if you edit the .js script you must also change the version # in the function file?
Basic question: if I know how to JavaScript, why do I need the basic WP theme at all? Wouldn't it make more sense for me to code the website from scratch? This is something I'm not getting...
Is your choice. For Freelancers, it all depends on the clients budget.
okay well can you give us some real advice on what website hosts to use instead of Wordpress?
Hi Steven! You can try GoDaddy. I'm using it for some sites and is pretty good.
fuck GoDaddy
@@sevens3383 How can someone give you advice and you start cursing? Are you okay in the head??
Hi, nice tutorial, I am kind of new in this, I did everything you said but nothing happen. Silly question: do I have to add any jQuery file to my wordpress?
Great tuts for me at the moments
Thanks!
very good. thank you
PLEASE HELP
I turned a CSS, Java and html website into a wordpress theme but i was only able to convert css and the html. I tried to add this into my function folder the same way you did but the java script is just not working not even alerts, every thing is right but it just doesn't work even though the website still loads.
My jquery is properly enqueued, but when I use class tags in my html they're unaffected by the jquery function.
If I had to add JavaScript code instead of jQuery what changes do I have to make? I mean in the array part.
Thanx a million
You are very welcome!
What extention did u used in your editor for the function name which was shown in your display when u wrote e few words and the whole function name has shown?
The text editor does that for you. Now I’m using VS Code and love it.
Enjoy your tuts... woowwwww....thanks
+Ammar Aiman You welcome!!
Dude you ate the navabar
Yumm! 🤤
Thanks bro
You welcome!
hi my fadetoggle does not work. i works partially. the class hides for less than a sec then shows
Thanks too! It helped!
there is no function brick_bone in function.php of my theme
could somebody help!! it fades for less than a second then it shows again. it does not completely come off
Thank you for your help, this has assisted me greatly.
how should I do if I want to add js to just specific one page? I think your code will add javascript file to all my wordpress pages but I want to add my javascript file just on a specific wordpress page
You can download a plugin that let's you add inline JS inside individual pages. Do a quick search.
Hey, it worked! :D Thanks for your supertutorial!
Awesome! You welcome.
Thanks for this tutorial !
+Christian Georgie Adou-Boni You welcome!!
thank you just what I needed !! :)
Thank you for sharing this! I was having errors when I added a version for some reason, but it worked after I replaced the version with empty parentheses ''. If anyone can explain the reason why the version number could have interfered with the scripts.js file connecting correctly to my functions.php and header.php file, I'd love to hear your insights.
Really well done! Thank you.
+Daniel Bachmann You welcome!
+Daniel Bachmann You welcome!
anyone know the name of that or similar theme?
How did you get your Wordpress files in a script editor?
+Michael Nielsen Download WordPress and your theme to you computer.
That’s awesome, thanks!
You welcome!
this code is not work for me
Realy good job.
Can you say me how i can add a java banner in my contribution?!
Thanks for help
What do you mean with "Java Banner" ?
good job!!
Thanks! :)
wooow that is awesome
Hi! I followed your tutorial but when I refreshed the page it became blank, I'm sure the syntax is correct, any idea?
No sorry, I fixed it, but the jQuery script won't work, although it works in a normal HTML as I tried with JSFiddle, so must be a wordpress related problem...
+Giorgio Vitanza Check your browser console. There must be some kind of error.
I checked my page source and the script is not there...
function nav_script () {
wp_enqueue_script( 'script', get_stylesheet_directory_uri() .'/js/script.js', array('jQuery'), '1.0.0', false);
}
add_action('wp_enqueue_scripts', 'nav_script');
I can't spot any error....
iEatWebsites It doesn't display anything, maybe it's a cdn related issue, are u adding any cdn to ur wordpress site?
Apparently jquery can't be caps in array. I copied your code and had the same problem lol.
Cool stuff.
Tysm man!
thanks a lot bro ur great man merci gracias chokran
You Welcome! 😊
loved it
How many of you minimized the video to confirm whether their screen has a faulty line in the middle
sweet mate
Thanks! :)
Thank you!!!!
You welcome! :)
Thanks!
You welcome!
posta o código para download por favor
DUDE THIS IS CSS OMG
there is no point making a videao if you don't explain WHY you do all this... just post the code man.
A mere 10 minute video filled with errors, why even publish this, record it again
me: 9:18
Thanks!
You welcome!