@tinycoder,
I’d love to help you but I don’t really know what you’re doing so its hard to say what could be going wrong.
Are you building a custom post type and those are custom meta that you’ve added to that custom post type?
Do you have code samples of the code you’ve used to add these meta values into your custom post type if thats what you did?
Pretty much any information that lead you do this point could help me figure out what you’re doing and then help you get the results you’d like to see in your endpoint!
Also, a side note if you’re registering your meta with register_post_meta() did you use the argument 'show_in_rest' => true?
Cheers,
Freddie
Hi, it is a simple custom post type, I already activated 'show_in_rest' => true, i said that some keys are showing clearly, as I activated them in the Controller plugin. However, some fields are showing null for all posts even if they are filled with normal data just like other keys.
All the keys are simply added with add_post_meta() function.
Let me show you in details with screenshots:
1- Here is the post type with the active keys:
https://i.ibb.co/0jvQfgF/image.png
2- Here you can see the post id 994 meta keys
https://i.ibb.co/vm00zNf/image.png
3- Here you can see the result from the REST URL, with the values null even if they are filled with data (like services_discount and total).
https://i.ibb.co/9nFFn6P/image.png
-
This reply was modified 6 years, 4 months ago by
tinyCoder.