[ad_1]
[ad_2]
As titles says, in documentation or on forums i cant find way to retrive list of all metafields, i was able only to get fields which have data saved
Copyright © 2020 - 2022, Project DMC - WordPress Tutorials for Beginners- All Rights Reserved. Privacy Policy
That’s because there is no schema per se for custom fields (aka post meta) in WordPress®. And that’s kind of the point.
You would need to maintain a list of them yourself somewhere in code, with say, the default values. Then you would retrieve the actual values per post and merge them into the defaults.
If you’re working with blocks or the JSON API, check out [register_post_meta](https://developer.wordpress.org/reference/functions/register_post_meta/).