• Tuesday , 20 November 2018

How To Add Javascript To WordPress

Code Canyon



In this video I will show you how you can add you own Javascript file to WordPress. I love Javascript!!

wp_enqueue_script code reference:

add_action()

Javascript: https://developer.mozilla.org/en-US/docs/Web/JavaScript

jQuery: https://jquery.com/

If you have questions please leave a comment below.

Twitter: https://twitter.com/ieatwebsites
Linkedin: https://www.linkedin.com/in/joseluisfremaint
instagram: https://www.instagram.com/ieatwebs/
Facebook: https://www.facebook.com/Ieatwebsites/

Music by PeriTune – Coffee Lounge


Original source

3d Ocean

Related Posts

31 Comments

  1. Eniel Garcia
    September 16, 2018 at 09:29

    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?

  2. Ademola Alabi
    September 16, 2018 at 09:29

    Thank you for your help, this has assisted me greatly.

  3. 정호섭
    September 16, 2018 at 09:29

    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

  4. sharifa bahar
    September 16, 2018 at 09:29

    It works well for me. Your video saved my life in the company. Thank you so much for the excellent explanation.

  5. teemoIRL
    September 16, 2018 at 09:29

    a basic problem i had was when i used the get_stylesheet_directory_uri, it came up with an abort and said it was trying to go through the themes style.css file instead of going straight into the JS folder, if you have this problem use get_template_directory_uri instead, probably a better idea to beguin with, not sure why ude use a style directory for a js file

  6. José M Montoro
    September 16, 2018 at 09:29

    That’s awesome, thanks!

  7. Wilfred Bancairen
    September 16, 2018 at 09:29

    Thanks!

  8. sancho
    September 16, 2018 at 09:29

    Thank you J!!!!! I'm a newbie and was up until 3 trying to figure my crap website and your solution solved my problem!!

  9. Hezi Tenenboim
    September 16, 2018 at 09:29

    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…

  10. Ammar Aiman
    September 16, 2018 at 09:29

    Enjoy your tuts… woowwwww….thanks

  11. Christian Georgie Adou-Boni
    September 16, 2018 at 09:29

    Thanks for this tutorial !

  12. Santosh Kumar
    September 16, 2018 at 09:29

    loved it

  13. Life got Creative
    September 16, 2018 at 09:29

    Hi, the following SCRIPT is BLOCKED when I check google console. Do you know how htt​p:/​/pa​gea​d2.​goo​gle​syn​dic​ati​on.​com​/pa​gea​d/j​s/a​dsb​ygo​ogl​e.j​s error can be fixed please?

  14. Ahaiziah Shako
    September 16, 2018 at 09:29

    could somebody help!! it fades for less than a second then it shows again. it does not completely come off

  15. Ahaiziah Shako
    September 16, 2018 at 09:29

    hi my fadetoggle does not work. i works partially. the class hides for less than a sec then shows

  16. TECNOPLAYTV
    September 16, 2018 at 09:29

    posta o código para download por favor

  17. Bucur Ion Niculae
    September 16, 2018 at 09:29

    Cool stuff.

  18. Daniel Bachmann
    September 16, 2018 at 09:29

    Really well done! Thank you.

  19. mickomoo
    September 16, 2018 at 09:29

    My jquery is properly enqueued, but when I use class tags in my html they're unaffected by the jquery function.

  20. Giorgio Vitanza
    September 16, 2018 at 09:29

    Hi! I followed your tutorial but when I refreshed the page it became blank, I'm sure the syntax is correct, any idea?

  21. ilyabitru
    September 16, 2018 at 09:29

    Thank you!!!!

  22. SnakeKoRn
    September 16, 2018 at 09:29

    Tysm man!

  23. madushan senevirathna
    September 16, 2018 at 09:29

    How to call jQuery library to functions.php

  24. Feroz Bhagoe
    September 16, 2018 at 09:29

    Hey, it worked! 😀 Thanks for your supertutorial!

  25. SpacingCake
    September 16, 2018 at 09:29

    heey but what happen when you update the theme? than every thing is gone right?

  26. Abdo Abo
    September 16, 2018 at 09:29

    thanks a lot bro ur great man merci gracias chokran

  27. Michael Nielsen
    September 16, 2018 at 09:29

    How did you get your WordPress files in a script editor?

  28. Invsisible
    September 16, 2018 at 09:29

    Realy good job.
    Can you say me how i can add a java banner in my contribution?!

    Thanks for help

  29. Zuc Zuc
    September 16, 2018 at 09:29

    good job!!

  30. Marc M
    September 16, 2018 at 09:29

    sweet mate

  31. Daniel Campos
    September 16, 2018 at 09:29

    wooow that is awesome

Leave A Comment

You must be logged in to post a comment.