Support

Account

Home Forums Add-ons Repeater Field Show post object's fields in backend… Reply To: Show post object's fields in backend…

  • Hi @bigfootnetworks

    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 🙂