WP REST API - Custom Post Types And Fields

preview_player
Показать описание
In this video we are going to create WP REST API custom endpoint which will also show custom fields made with ACF.

### Code used in this video

### You can support my work on Patreon

### Follow me on Social Media

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

Hi !
If I didn't use ACF to create my custom post and field how can take my meta data ?
I mean that the function "get_field" is created by ACF but when I use your code I have this message "Uncaught Error: Call to undefined function get_field() "

Another function exist to call custom fields from my database ? Thanks for the tuto.

forlaps-agendaautomobile
Автор

Thank you, you save me a lot of time. ; )

joseantonioandreu
Автор

Hello. Thank you for the video. I have an issue with custom post types. I have created product post type and wordpress api shows me json data in broweser for this post type. But when I try to post to API by specifing 'type':'product' post content goes to normal post type (not to custom post type products). How can I solve this?

JaehoonMe
Автор

Hi! I have a custom field which is number field, but output of rest is like as "height": "35.48591", but i need to this format "height": 35.48591 without quotes. How can do this?

koprualt
Автор

How to rest enable the custom fields using the plugin. Is there any plugin which can do this.

adarshsoni
Автор

great work, thank you!!! I'm beginner with php but all works great!
we learned from this video how to get the info from database but i want to post the info too! please tell me how can i post it!
thank you again.

LoL-lgdp
Автор

Is there a way to do a POST method to a custom field?

stephendeo
Автор

I am recreating what you have done above but instead for users, I have it working for the standard wordpress user fields but when I try to add the acf user fields to the end point I keep getting a null value. Also is there a way that I can allow this end point to be read and updated too? Thanks

jozayw
Автор

Can we get theme name, active plugins, which plugin needs update info outside of wordpress admin in a separate dashboard?

SMARTHELP
Автор

How do you like the WP api vs using October CMS

LetTheWritersWrite
Автор

what about custom ordering & pagination for the products?

jfudman
Автор

How would you get the endpoint to show a woocommerce order with some order details?

MarceloCoelho
Автор

bro i am getting cors error when deployed the website,
i am using nextjs on client and hosting it to vercel

kumardeepanshu
Автор

Hi. Thanks for the informative video. How do I return an array of ids in this example? I have an array of topics with the values "topic": [1, 2, 3] when I view the standard rest api, but when I use the code $data[$i]['topic'] = $post->post_topic; my results are "topic": "" and not 1, 2, 3. Your assistance will be greatly appreciated. Thanks

hjbritz
Автор

Where is this custom-api.php file from?

knut.becker
Автор

Can you make a Wordpress+Flutter app series? Maybe on Udemy.

Mayanktaker
Автор

Is there any way to edit the meta title and description of Yoast or Rank Math?

mukeshwarsingh
Автор

Hello, how to render content as html which have shortcut code and all. any body help me pls?

babujune