Support

Account

Home Forums Front-end Issues How do you create post_title from another field(s) in ACF Pro? Reply To: How do you create post_title from another field(s) in ACF Pro?

  • ***************
    The following function should be able to help you get the value and assign it to the post
    function get_acf_title( $post_id ){
    $title = get_field( ‘title’, $post_id );

    if( empty( $title ) ){
    $title = get_the_title( $post_id );
    }

    if( $title == ‘-‘ ){
    $title = ”;
    }

    return apply_filters( ‘the_title’, $title );
    }
    **********************************