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

  • You’re going to need to add some more information that I don’t see in any of your code, but I found a function in WP that will do this

    $data['post_name'] = wp_unique_post_slug(sanitize_title( $data['post_title'] ), $post_id, $post_status, $post_type, $post_parent);

    It appears that all of the arguments for this function are required and there’s not much information on using it.