hi, I want to know how to create categories outside the admin panel.Don't suggest any plugin.wp_create_category(),Is this is the right function to create categories outside wordpress?if so,how and where to use it.
Use the wp_create_category() function when you only need to specify the name and parent of the new category. The wp_insert_category() function is used when you also need to specify the ID, description, and nicename.
Thank you,but when including wp_create_category() or wp_insert_category() in functions.php,it shows error.can u tell me how to include with an example?
Sorry, the Codex skips a few important things, like how those functions are part of the admin API. Seems you have to include wp-admin/includes/taxonomy.php, but I only found that out by searching the Wordpress forums. Here is an example: http://wordpress.org/support/topic/amf-service-wordpress-minimal-initialization