Home › Forums › ACF PRO › load_field › Reply To: load_field
Hi again
I also tried this…
global $post_id;
$post_id = $_GET['post'];
add_filter('acf/load_field/key=field_5bf31d5e8e1eb', function ( $field ) use ($post_id) {
$related_ids = get_field( 'ARTrelationship_SRCrelationship', $post_id ); //Will not work (it removes the default selection and replaces them with 'No results found')
// this still works
$related_ids = get_field( 'ARTrelationship_SRCrelationship', 14341 ); //Works and adds 'Lithograph' and 'Etching'
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.