Home › Forums › Backend Issues (wp-admin) › modifying the post object return value on backend › Reply To: modifying the post object return value on backend
Actually found a solution and was so much easier than expected, if anyone else needs this…
add_filter('acf/fields/post_object/result', 'my_post_object_result', 10, 4);
function my_post_object_result( $text, $post, $field, $post_id ) {
/* Get whatever value you want here e.g. */
$text .= ' (' . tribe_get_venue($post->ID) . ')';
/* do any other processing you might want to do before returning it... */
return $text;
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.