Support

Account

Home Forums General Issues Automatic post title from custom fields Reply To: Automatic post title from custom fields

  • OK, so this works on UPDATE but not on PUBLISH when the initial post is created:

    function my_function( $value ) {
        if ( empty( $value ) ) :
            return get_field( "firstname" ) .  get_field( "lastname" );
        endif;
        return $value;
    }
    add_filter('title_save_pre', 'my_function');

    Any ideas anyone?