Taxonomy

Get category ID

Get category ID

$category_id = get_cat_ID( 'category name' );

Get top-level categories

$top_categories = get_categories( array( 'parent' => 0 ) );

Register taxonomy for cpt, with corresponding slug for cpt

register_taxonomy( 'jobs', 'agiledrop', array( 'rewrite' => array( 'slug' => 'agiledrop/jobs' ) ) );

Check if term exists

‌‌term_exists( 'uncategorized' );