How To Add Javascript To WordPress

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ •

  • @cyphi1
    @cyphi1 3 роки тому +3

    I didn't have a js folder in my theme folder, I had to add it. but it's working now...this helps!! thanks!!

  • @Lorant1984
    @Lorant1984 4 роки тому +1

    THIS is the proper way to add Javascript.

  • @TrulyManish
    @TrulyManish 2 роки тому +1

    thanks for this tutorial. and like the way you make videos. 😄

  • @Eggsec
    @Eggsec 3 роки тому +1

    Thank you sooo mucu sir!! I needed as am working on a WordPress theme and I have like 5% Javascript to incorporate. Thank you

  • @AysProPlugins
    @AysProPlugins 3 роки тому +2

    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

  • @LeatherClass
    @LeatherClass 4 роки тому +2

    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.

  • @sharifabahar6257
    @sharifabahar6257 6 років тому

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

  • @TheMandagusis
    @TheMandagusis 3 роки тому +1

    Thanks man, you helped a bunch!

  • @AlainMazy
    @AlainMazy 3 роки тому +1

    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?

    • @ieatwebsites
      @ieatwebsites  3 роки тому

      You can use the “load event”. Search for it.

  • @davewettlaufer7885
    @davewettlaufer7885 4 роки тому +7

    i'll be back when I understand it better.

  • @desventurasdati
    @desventurasdati 3 роки тому +1

    Thank you very much!!!

  • @grantnichols4283
    @grantnichols4283 5 років тому +2

    Thanks J - Hours of searching just finished with this cool tutorial! :)

  • @madushansenevirathna5493
    @madushansenevirathna5493 7 років тому +3

    How to call jQuery library to functions.php

  • @valentingrenier9553
    @valentingrenier9553 2 роки тому +1

    Thanks a lot !!

  • @abdul_qadir7780
    @abdul_qadir7780 5 років тому +2

    Great.. 👍

  • @cyphi1
    @cyphi1 3 роки тому

    Apparently if you edit the .js script you must also change the version # in the function file?

  • @PixieSpright
    @PixieSpright 6 років тому +4

    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...

    • @ieatwebsites
      @ieatwebsites  6 років тому +2

      Is your choice. For Freelancers, it all depends on the clients budget.

    • @sevens3383
      @sevens3383 6 років тому

      okay well can you give us some real advice on what website hosts to use instead of Wordpress?

    • @ieatwebsites
      @ieatwebsites  6 років тому

      Hi Steven! You can try GoDaddy. I'm using it for some sites and is pretty good.

    • @sevens3383
      @sevens3383 6 років тому +7

      fuck GoDaddy

    • @SaintMTE
      @SaintMTE 5 років тому +4

      @@sevens3383 How can someone give you advice and you start cursing? Are you okay in the head??

  • @enielgarcia6432
    @enielgarcia6432 6 років тому +1

    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?

  • @ibrahimpashaa9334
    @ibrahimpashaa9334 4 роки тому

    Great tuts for me at the moments

  • @sfetcucristian2949
    @sfetcucristian2949 2 роки тому

    very good. thank you

  • @DE1
    @DE1 3 роки тому

    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.

  • @mickomoo
    @mickomoo 7 років тому

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

  • @jawadfarrukh6736
    @jawadfarrukh6736 3 роки тому

    If I had to add JavaScript code instead of jQuery what changes do I have to make? I mean in the array part.

  • @PLUS-sj4sf
    @PLUS-sj4sf 3 роки тому +1

    Thanx a million

  • @OnlineTechEarn
    @OnlineTechEarn 4 роки тому

    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?

    • @ieatwebsites
      @ieatwebsites  4 роки тому

      The text editor does that for you. Now I’m using VS Code and love it.

  • @fashiongadgets2001
    @fashiongadgets2001 7 років тому

    Enjoy your tuts... woowwwww....thanks

  • @mateusfelipe1700
    @mateusfelipe1700 4 роки тому +2

    Dude you ate the navabar

  • @bilalshafique6317
    @bilalshafique6317 4 роки тому +1

    Thanks bro

  • @AhaiziahP
    @AhaiziahP 7 років тому

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

  • @LucXX36
    @LucXX36 5 років тому +1

    Thanks too! It helped!

  • @sidraaleem6010
    @sidraaleem6010 5 років тому

    there is no function brick_bone in function.php of my theme

  • @AhaiziahP
    @AhaiziahP 7 років тому

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

  • @AdemolaAlabi
    @AdemolaAlabi 6 років тому

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

  • @dbxmqmdbxmqm
    @dbxmqmdbxmqm 6 років тому

    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

    • @ieatwebsites
      @ieatwebsites  6 років тому

      You can download a plugin that let's you add inline JS inside individual pages. Do a quick search.

  • @flexxzionone
    @flexxzionone 7 років тому

    Hey, it worked! :D Thanks for your supertutorial!

  • @georgieadouboni
    @georgieadouboni 7 років тому

    Thanks for this tutorial !

    • @ieatwebsites
      @ieatwebsites  7 років тому

      +Christian Georgie Adou-Boni You welcome!!

  • @DavidSusen
    @DavidSusen 6 років тому +1

    thank you just what I needed !! :)

  • @studywithrobin2715
    @studywithrobin2715 3 роки тому +1

    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.

  • @DanielBachmann
    @DanielBachmann 7 років тому

    Really well done! Thank you.

  • @vendigi
    @vendigi 5 років тому

    anyone know the name of that or similar theme?

  • @Michael_H_Nielsen
    @Michael_H_Nielsen 7 років тому

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

    • @ieatwebsites
      @ieatwebsites  7 років тому

      +Michael Nielsen Download WordPress and your theme to you computer.

  • @josemontoro5751
    @josemontoro5751 6 років тому +1

    That’s awesome, thanks!

  • @funmaker7808
    @funmaker7808 5 років тому

    this code is not work for me

  • @invsisible9096
    @invsisible9096 7 років тому

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

    • @ieatwebsites
      @ieatwebsites  7 років тому

      What do you mean with "Java Banner" ?

  • @zuczuc6603
    @zuczuc6603 7 років тому

    good job!!

  • @danielcampos5573
    @danielcampos5573 7 років тому +1

    wooow that is awesome

  • @uccelloteschiorosso
    @uccelloteschiorosso 7 років тому

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

    • @uccelloteschiorosso
      @uccelloteschiorosso 7 років тому

      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...

    • @ieatwebsites
      @ieatwebsites  7 років тому

      +Giorgio Vitanza Check your browser console. There must be some kind of error.

    • @uccelloteschiorosso
      @uccelloteschiorosso 7 років тому

      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....

    • @uccelloteschiorosso
      @uccelloteschiorosso 7 років тому

      iEatWebsites It doesn't display anything, maybe it's a cdn related issue, are u adding any cdn to ur wordpress site?

    • @mickomoo
      @mickomoo 7 років тому

      Apparently jquery can't be caps in array. I copied your code and had the same problem lol.

  • @BucurIonNiculae
    @BucurIonNiculae 7 років тому

    Cool stuff.

  • @SnakeKoRn
    @SnakeKoRn 7 років тому +1

    Tysm man!

  • @abdoabo7012
    @abdoabo7012 7 років тому

    thanks a lot bro ur great man merci gracias chokran

  • @santoshjmb
    @santoshjmb 7 років тому

    loved it

  • @10trends57
    @10trends57 3 роки тому

    How many of you minimized the video to confirm whether their screen has a faulty line in the middle

  • @marcmoeller6656
    @marcmoeller6656 7 років тому

    sweet mate

  • @ilyabitru
    @ilyabitru 7 років тому

    Thank you!!!!

  • @wilfred05777
    @wilfred05777 6 років тому +1

    Thanks!

  • @TECNOPLAYTV
    @TECNOPLAYTV 7 років тому

    posta o código para download por favor

  • @Charles-kv3fs
    @Charles-kv3fs 4 роки тому

    DUDE THIS IS CSS OMG

  • @ericpodhorecki5427
    @ericpodhorecki5427 2 роки тому

    there is no point making a videao if you don't explain WHY you do all this... just post the code man.

  • @fwef7445
    @fwef7445 2 роки тому

    A mere 10 minute video filled with errors, why even publish this, record it again

  • @ednahafzi2159
    @ednahafzi2159 4 роки тому

    me: 9:18

  • @jovannikolic6346
    @jovannikolic6346 4 роки тому +1

    Thanks!