WP REST API - Custom Endpoints

preview_player
Показать описание
In this video we are going to learn how to quickly create custom endpoints for our #WordPress #REST #API.

WordPress default API can sometimes be too much, it can give us more information then we actually need, also it can sometimes be hard to access WordPress media, because WordPress just gives you an ID of the media, and then you have to access another huge endpoint just to get the URL from the image, for example.

Luckily, WordPress comes with built in methods for creating custom end points, so that way you can create your own API, that suits your needs exactly.

### Code used in this video

### You can support my work on Patreon

### You can support my work on Patreon

### Follow me on Social Media

Рекомендации по теме
Комментарии
Автор

Amazing! I was too lazy to read the developer docs and this video saved me.

OmarBadran-ir
Автор

Wow, i was looking for this information. Thank you! Grettings from Bolivia.

justinianoleo
Автор

Thank you for this. I needed to send the output of a js function I built to an API endpoint for the app developer I am working with. This video was one of the links in the chain that I needed. I appreciate how clearly stated and demonstrated this was.

christopherlikins
Автор

It's a privilege to meet you all. I hope your families experience excellent health, prosperity, and plenty of good fortune.

ThomasBui
Автор

Very use full video hidden gem for me i am creating one mobile app and i want this kind of solution thankyou so much for this sir...

murtuzamakda
Автор

Thanks for sharing this!

I'm using LearnPress plugin data to be consumed from an external web service.

Thanks!

Автор

I'm a simple guy who needs simple explanations. This video was awesome, thank you!

MrCelik
Автор

Thank you for keeping it simple. I need a bit more information for my purpose but now I understand how custom endpoints work. You put me on the right track. Happy New Year!

tedspens
Автор

Thank you for the tutorial! And many thanks for using a dark background editor👌, my eyes are sore from other's tutorials with light themed editors 😒😒

florinberechet
Автор

Thank you man, watched and learnt...neat and clean!
I just subscribed, yes, because of your great content, but above all after seeing again the pic at 6:48...actually also because you didn't bore any of us with wasting time in asking us to subscribe, to ring the bell, to comment below, to pet our cat, to clean our room, etc etc...
Hvala!
(Am i right if I guess that your English is pretty amazingly Serbian?)

sgotTube
Автор

Thankyou, you are a great teacher, keep it up. And I like the outro music

MrChrisJ
Автор

I didn't see the video you mentioned and I'm only here to learn about custom endpoints. Surprise!! :D

skaramicke
Автор

I would like to ask, ermm where you got that wp-json? I'm so sorry to ask this since i'm a beginner and i don't quite understand to this topic

nurulfarhana
Автор

hi do you have a video for WP REST API where we can update the data? I dont see any videos regarding to that. all of the youtube videos available are just getting data

darickquinto
Автор

Great tutorial man, very useful. It makes the output of the json object so much cleaner. With custom fields, I believe I can use it to create an online task organizer.

danmusiceasy
Автор

Uff me has ayudado un montón, gracias!

epr
Автор

Thank you for this wonderful project but Is it only exclusive to WordPress or can be use in other website.

ECSYL
Автор

Thanks for video. How can i do with a external API. Would you help use with short video ? Thanks again.

josykial
Автор

Thank you, that is what I am looking for) how to make it only for authorized people? And get his user id? I want to save user data to the database

evgeniisharaborin
Автор

Post structure only contains the ID for good reasons. Imagine a react app with couple of posts. First you get post data, almost instantly then Ajax requests to that media endpoint to lazy load images. For medium scale apps that structure is amazing. I was thinking the same but is not worth it to write custom endpoint for reasons in the video but I guess the purpose of it is to introduce the api.

bicanmarianvaleriu