AJAX in WordPress using admin-ajax.php

Поділитися
Вставка
  • Опубліковано 25 січ 2025

КОМЕНТАРІ • 34

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

    So I look around the web but eventually come back here. This man is the best.

  • @GuptaTreePoint
    @GuptaTreePoint 4 роки тому +4

    Where should I create hook and ajax function please explain file also bcz I am new in WordPress

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

    can you put the code that goes on the plugin in functions.php file ?

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

    Djembé, coolest percussion

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

    The second ajax call sends me to wp-admin/admin-ajax.php page. How to redirect to original page (where from 1st ajax call was sent) and make 2nd ajax call from there with new variables?

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

    Why doesn't WordPress have all of this setup by default? Even when I've used JS editors plugins I kept running into problems trying to get an ID to fade in/out and update/change content...never quite worked hence I'm here trying to figure out why. I'm using Elementor so that could be causing problems.

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

    Please consider adding captions for the hearing impaired. :)

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

    Dude, thank you! I was given a project that has been hell. lol. This was very clear and easy to follow.

  • @ahmedmusawir
    @ahmedmusawir 5 років тому +15

    Great stuff! Would be better if your face wasn't blocking the code ...

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

    where do you put your javascripts?

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

    I totally do not understand what i need to put into my url like i have been trying this for serval months and it still does not work. I followed 1000 tutorials they all say the same but no results

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

    Wow perfect! I'm recently thought, that finally, I've started understand how does AJAX works in WordPress after I've done some small features in different projects. Dude! Excellent explanation, great job!, but now I h8 u!)

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

    Dude you speak so fast (compared to other tutorials) I tought the video was at 2 velocity, that's amazing. Thanks for the video!

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

    did somebody try moving his picture by dragging on screen???

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

    where is the next video with the examples?

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

    I'm having a Status Code: 400 Bad Request. What could be wrong?

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

    This video would have so much more value if you demonstrated it with a simple example.

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

    Hey there!
    Excelent tutorial, it worked for me. I have one question. Is it possible to print the result into the theme (php) with echo or something like that?

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

    just a question where should i put the localize_script?

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

      @Michael Lau He has a separate video on how to do it. Look it up. ua-cam.com/video/omTuBUS1Tvo/v-deo.html

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

    Nice teaches, thank you, Zac (bro:). Also quite adequate cultural background is being sported behind ya! :D Keep going!

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

    what font do you use when you code? I want that "f" lol

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

      Dank Mono :)
      javascriptforwp.com/vscode-settings/

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

      I also wanted that font! I'm coming for ya Dank Mono 🤪

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

    Two questions: Why address the source code in form of a plugin (wouldn't it be better to use without plugins)? Why don't you actually show the functionality in this video (getting errors when I implement your code in clean WP install)? Unfortunately this is not a method that can be easily implemented within every WP install ;(

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

      Did you try using the code in the repo linked from the video? AJAX should be something you can add to any WordPress plugin or theme :)

  • @KailashKumar-cy1yz
    @KailashKumar-cy1yz 4 роки тому

    Hii For the AJAX filter for blog post and custom post time check this plugin: wordpress.org/plugins/category-ajax-filter/

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

    Awesome video, smooth explaination~
    I used >url: ajaxurl< before since it's ougth to be the same (well, preset). Is it? :P
    Helped big, thx again!

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

      I believe it's preset if you're logged in (?and in admin?), but not if you're logged out.

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

    I see! 🤔

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

    Yes! Always start a guide or a tutorial with a four minute technical rambling with as many different concepts that you can think of. You can then safely explain what you plan to make and what the benefit would be. If you feel that is too soon, then just go on another rambling about the specific code that you want to use.

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

      And if you at the end forget to mention why you would do all this, it is not a problem. Most people will have left the video long before that.

  • @md.hasanmahmud7883
    @md.hasanmahmud7883 4 роки тому

    I wish I could see the code beyond your face