Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: [Assigned] Create custom taxonomy tag from post title w/ Cred

$
0
0

Hi jeffM,

Please try this:

add_action('cred_save_data_513','practitioner_title_tag');
function practitioner_title_tag($post_id) {
$type = get_post_type($post_id);
if ($type == 'practitioner') {
$title_tag = get_post_meta($post_id, 'post_title', true);
$slug = sanitize_title($title_tag);
wp_update_post(array('ID' => $post_id, 'person' => $title_tag, 'post_name' => $slug));
}

More help: http://wp-types.com/documentation/user-guides/cred-api/


Viewing all articles
Browse latest Browse all 20145

Trending Articles