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);
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.