Home › Forums › Add-ons › Repeater Field › Show post object's fields in backend… › Reply To: Show post object's fields in backend…
It depends on how you want it to show up. If you want the data to show up when you change the post object, you need to use AJAX.
If you don’t need the data to show up right away, you can use this code:
function action_function_name( $field ) {
if( $field['value'] ){
$thepost = get_post($field['value']);
echo '<p>'. $thepost->post_title .'</p>';
}
}
add_action( 'acf/render_field/type=post_object', 'action_function_name', 20, 1 );
That code will show the post title after you saved the post/page that has the post object field.
If you need further customization, I’m afraid you would need to hire a developer to help you out with it, and I’d recommend looking for one on https://studio.envato.com/ or https://www.upwork.com/.
I hope this helps 🙂
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.