Home › Forums › Backend Issues (wp-admin) › Append/prepend to related fields › Reply To: Append/prepend to related fields
I’ve made progress with this with the following code:
add_filter('acf/fields/relationship/result/key=field_63b7f8c607ba7', 'my_acf_fields_relationship_result', 10, 4);
function my_acf_fields_relationship_result( $text, $post, $field, $post_id ) {
$project_artist = get_field('artist',$post->ID);
return $text." (".$project_artist[0]->post_title.")";
}
…my issue now is that the wp-admin search for the relationship field doesn’t see the appended artist names. Is there some way for the search to see this?
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.