Deletes one existing category.
Parameters
$cat_idintrequired- Category term ID.
Source
function wp_delete_category( $cat_id ) {
return wp_delete_term( $cat_id, 'category' );
}
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
Deletes one existing category.
$cat_idintrequiredfunction wp_delete_category( $cat_id ) {
return wp_delete_term( $cat_id, 'category' );
}
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
Example