Home › Forums › Backend Issues (wp-admin) › Relation field – show acf value with title in admin search › Reply To: Relation field – show acf value with title in admin search
Thank you, but how to achieve that? My ACF relation field name is “product_accessories”. I would like to show field “product_index” next to title.
I try to check how it works with, but with no success:
add_filter('acf/fields/post_object/result/name=product_accessories', 'my_acf_fields_post_object_result', 10, 4);
function my_acf_fields_post_object_result( $text, $post, $field, $post_id ) {
$text .= ' (' . $post->post_type . ')';
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.