Support

Account

Home Forums Backend Issues (wp-admin) Generate post title from two ACF fields Reply To: Generate post title from two ACF fields

  • Thankyou for that. Would i just use the code as you have types it, or would i need to edit to $new_title?

    $post->post_title = get_field('site_name', $post_id).' '.get_field('site_location', $post_id);

       
        if ( get_post_type( $post_id ) == 'sites' ) {
            <ul>
    $new_title = get_field( 'site_name', $post_id );</ul>
    
            $new_slug = sanitize_title( $new_title );
        }