3 Methods for AJAX in WordPress | Which Method is the Best?

Поделиться
HTML-код
  • Опубликовано: 28 ноя 2024

Комментарии • 45

  • @WPCasts
    @WPCasts  4 года назад +4

    I hope you guys learned something! If you want to chat, follow me on Twitter: twitter.com/AlexanderBYoung

  • @TheMarouuu
    @TheMarouuu 4 года назад +7

    42 people forgot to like the video so far. Cmon folks, give this dude some likes.
    Too many beginner videos out there. We need intermediate knowledge like this. For free too!
    Give this dude some support!

  • @vhugoxgnu
    @vhugoxgnu 2 года назад

    Excellent video. I've used "admin-ajax" for 2 years so fat and realized now It's not the best WP practice. Thank you!

  • @jaspzhy3589
    @jaspzhy3589 4 года назад

    YES!! I have been using admin-ajax for so long but struggle to understand where does REST API come in, or what Rewrite API does
    this really helped a lot! Thank you!

  • @ezdevv3160
    @ezdevv3160 3 года назад +2

    it makes so much sense to have vs-code tools on the right

  • @Rbog17
    @Rbog17 3 года назад

    Wow...never even heard of the rewrite api for Ajax. Guess I been under a rock. I don't understand regex very well, but seems I need to give it a shot. Never heard of artillery either. Bravo. That's some quality WP developer content. Hats off.

  • @apisitmhungchomphu4205
    @apisitmhungchomphu4205 4 года назад +1

    I try to understand what you said because i'm still practice english and i work about wordpress with westerner( Thank you for share your knowledge).

  • @attilabalog6753
    @attilabalog6753 3 года назад +1

    Thanks for the great tutorial, have to do some ajax request via admin-ajax, but i keep getting 403 forbidden. Couldn't fix for a day (i'm at work don't have too much time to debug properly).
    The rest-api solution works for me.
    BIG THANK YOU!!!!!

  • @jacobharris3929
    @jacobharris3929 2 года назад

    the rewrite rule stuff is super clever, thanks for sharing

  • @pavelasafov
    @pavelasafov Год назад

    Thank you, Alex! I'm starting to master WordPress using your lessons.

  • @VeganGaymer
    @VeganGaymer 5 месяцев назад

    Hi Alex! I got a problem where my cart does not adjust the shipping automatically when adding or removing the same item from the cart. The customer would have to reload the cart page or go to the checkout to see the right shipping price. Do you have any videos on this? Thanks

  • @stephanroder1371
    @stephanroder1371 Год назад

    I haven't seen more than 4:50 minutes of his video, but I can already tell: he's an export and "listens to him".

  • @azizultex
    @azizultex 4 года назад +1

    What do you think of GraphQL? Is it better than all these 3?

  • @zansmolic1114
    @zansmolic1114 4 года назад +3

    I wish there would be a beginner level video to this video, to understand what's you're saying better.

  • @nielsofficeofficial9706
    @nielsofficeofficial9706 Год назад

    Is this really all about the fastest? I a bit wonder because does javascript can do that alone?
    why do you need to extend the rest class wp in php? are you registering a new API end point with wordpress? such stores? instead fetching the data from post/{} or user/{} for this demonstraion?

  • @a.i.r912
    @a.i.r912 3 года назад

    very cool i was searching this from long time

  • @maurypovich4033
    @maurypovich4033 4 года назад

    if you do a headless Wordpress do you still gotta write PHP code? Just curious how that works since the front-end that's displaying all the data is using javascript and an API.. I'm a jr so still wrapping my head around how things work. Also you seem to be very knowledgable with WP but your title at your job is frontend related, shouldn't you be considered fullstack? By the way thank you for all the content. You are paving your own path with this headless Wordpress stuff. It really is the future

  • @HaifengZhu-pn3uq
    @HaifengZhu-pn3uq Год назад

    what is ajax used for

  • @billwoods4935
    @billwoods4935 4 года назад

    Nice tutorial!!! Good job, I’m a big fan! I have seen you work with the form submission often times, so just out of curiosity, is there any reason that you don’t use “wp-nonce” for the form submission?

  • @ruhaanshWorld
    @ruhaanshWorld 3 года назад

    I copied your code in the themes folder and activated but I am still getting 404 errors when I click the submit button because of the routes.. How do I fix that?

  • @dnyaneshmj
    @dnyaneshmj 3 года назад

    Great work! Helped a lot

  • @zahiribishi7943
    @zahiribishi7943 2 года назад

    Can you create a video that explains CORS and making requests from outside

  • @filipvanreeth
    @filipvanreeth 4 года назад

    What’s the vscode theme you used 🤪?

  • @MaximusMcCullough
    @MaximusMcCullough 3 года назад

    Very Cool, thanks bro!

  • @JohnChandlerEdmonton
    @JohnChandlerEdmonton Год назад

    I'd like for ajax calls to not load plugins (like All in One SEO) that have no business being loaded and slow it all down.

  • @lorenzomijorus
    @lorenzomijorus 4 года назад

    very good tutorials. !! great job

  • @GregRobinsonHD
    @GregRobinsonHD 3 года назад

    Great video, thanks! @WPCasts - what's the extension or tool you're using at 11:01 to make the JSON appear neatly formatted and readable? Just curious, thanks.

    • @WPCasts
      @WPCasts  3 года назад +1

      It's called JSONView

    • @GregRobinsonHD
      @GregRobinsonHD 3 года назад

      @@WPCasts Thanks for the response! Loving your vids...

  • @manavbudhia
    @manavbudhia 4 года назад

    Very good tutorial.... really helpful thanks for this great post.
    When you are launching wordpress course ??

  • @adamsDevArt
    @adamsDevArt 2 года назад

    Can you please do another wordpress ajax video but with jQuery?

  • @junglized
    @junglized 4 года назад

    ....benchmarking using artillery... - o yeah! seatbelt fastened! :D

  • @padamsubba1973
    @padamsubba1973 4 года назад

    please make videos about ajaxing pages (single.php, page.php, archives etc )

  • @annietrinh1452
    @annietrinh1452 3 года назад

    Can you make live search for products with images result? I’m searching for many days but no one teach it

  • @professeurish
    @professeurish 3 года назад

    Thank you ❤

  • @learnwithkhubbaib
    @learnwithkhubbaib 4 года назад

    Sorry to say but never use /wp-admin/admin-ajax.php instead localize script using admin_url function so if some change wp-admin directory it will return correct one.

  • @errorerror1337
    @errorerror1337 4 года назад +2

    TLDR; Rewrite API FTW!
    Fucking awesome video dude, thank you for doing this, very helpful.

    • @WPCasts
      @WPCasts  4 года назад

      You’re very welcome!

  • @RodrigoChavesOficial
    @RodrigoChavesOficial 4 года назад

    THANK YOU.

    • @WPCasts
      @WPCasts  4 года назад

      You’re welcome :)

  • @msvmanikantasrivishnu7788
    @msvmanikantasrivishnu7788 4 года назад

    1st like comment...thank u

  • @tquoctuan97
    @tquoctuan97 4 года назад

    Thank you