Home Forums Front-end Issues Set post object field using php Reply To: Set post object field using php

  • Ok, I am following your advice. Can you point me in the right direction on how to pass the proposal id in the post object filter code? I am trying to figure out where to look..
    Thank a lot!

    function assign_proposal_to_review( $args, $field, $post_id ) {
        // only show children of the current post being edited
        $args['page_id'] = '???';
    	// return
        return $args;
    add_filter('acf/fields/post_object/query/name=proposal_reviewed', 'assign_proposal_to_review', 10, 3);