Changing taxonomy term by slug (wp_update_term)

As you hinted in your question, you could use get_term_by() to return an object or array containing the term’s id, then use it to update that term. Something like this should work: $your_term = get_term_by( ‘slug’, ‘your_slug’, ‘your_taxonomy’ ); if ( false !== $your_term ) { wp_update_term( $your_term->term_id, ‘your_taxonomy’, $args ); } References: http://codex.wordpress.org/Function_Reference/get_term_by http://codex.wordpress.org/Function_Reference/wp_update_term

Rewrite slug for CPT

Try this if you want to link your CPT archive in a menu: ‘has_archive’ => true, ‘rewrite’ => array( ‘slug’ => ‘generic’, ‘with_front’ => false ), After you re-save your permalinks, you can then add the link to your menu like this example: www.example.com/generic

WordPress not adding -2 to slugs when saving post as draft

I just ran a quick test and there shouldn’t necessarily be a “slug” — post_name in the $wpdb->posts table– until the post is published, so something is going wrong with your site– something has been modified. WordPress already checks for duplicate slugs. This is pretty critical functionality as certain permalink structures depend upon it. The … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)