add custom fields in acf relationship rest return
-
Hello,
when you select to return an object on a relationship acf field, it returns only custom post type informations.
I want to add custom informations in this return object to add to REST call.
Is there a hook or another method to add a custom meta to this object ?I want somethink like this :
“ACF”: {
“societe”: [
{
“ID”: 4542,
“post_author”: “5”,
“post_date”: “2019-09-17 13:50:26”,
“post_date_gmt”: “2019-09-17 11:50:26”,
“post_content”: “”,
“post_title”: “LOXAM”,
“post_excerpt”: “”,
“post_status”: “publish”,
“comment_status”: “closed”,
“ping_status”: “closed”,
“post_password”: “”,
“post_name”: “loxam”,
“to_ping”: “”,
“pinged”: “”,
“post_modified”: “2020-03-05 17:08:40”,
“post_modified_gmt”: “2020-03-05 16:08:40”,
“post_content_filtered”: “”,
“post_parent”: 0,
“guid”: “https://xxxxxx”,
“menu_order”: 0,
“post_type”: “societes”,
“post_mime_type”: “”,
“comment_count”: “0”,
“filter”: “raw”,
“custom_meta” : my_custom_data
}
],
- The topic ‘add custom fields in acf relationship rest return’ is closed to new replies.