Support

Account

Home Forums General Issues Fields not saving – Slug Reply To: Fields not saving – Slug

  • Only slightly shorter

    
    if (in_array($postarr['post_type'], array('post', 'page')) &&
        !in_array($data['post_status'], array('draft', 'pending', 'auto-draft'))) {
      $data['post_name'] = sanitize_title( $data['post_title'] );
    }