You could use the get_term_by() function: http://codex.wordpress.org/Function_Reference/get_term_by
// get the category object
$category = get_term_by( 'id', $category_id, 'category');
// use the object to get your values
$name = $category->name;
$slug = $category->slug;
Does this help?
Related Posts:
- Why is pre_get_posts hook invoked multiple times?
- is_page not triggering
- How to delete WooCommerce categories in bulk that only have one product
- admin_post_(action) hook create console log error
- Undefined fieldId in gform.addFilter for limiting dates in datepicker – Gravity Forms
- How to I prevent WordPress from switching external HTTP links to HTTPS?
- Stylesheet is getting removed/deregistered automatically
- How to override get_avatar() function?
- Check if front page within function passed to action
- How can I insert custom html code inside a div dynamically?
- Get First Post content and edit it using pre_get_posts (or similar?!)
- How to trigger click events using hooks
- WP_mail() Issue. Duplicate emails if $_GET[‘A’] == email
- Are there Hooks for featured image popup?
- Ajax Category add doesn’t update the list table custom column
- Hook after creating a post and retrieve infos from this post immediatly
- How to hook into creating a category?
- Hooks with same priority number. Can one stack items returned in divs, position: absolute each with their own z-index?
- trying to locate the correct file to edit my internal linking anchor tags
- add extra parameter in default hook in wordpress
- remove_action() hook not working
- Display custom debug info inside page and not before head
- Can add_image_size be added earlier
- WordPress sending data with add_action
- Change user role if it’s orders count more than
- How to hide / remove attachment “alt” or “caption” field in Admin?
- calculate values from a field and insert them into custom fields when publishing or updating post
- $new_pass always returns null – password_reset hook
- How WordPress understands what do with the (all) key in the $wp_filter array? [duplicate]
- Why does get_post() not return anything?
- Exclude WooCommerce terminations from YOAST
- Hourly events don’t get triggered
- Hook to change Author Info
- Hook triggered twice in a Woocommerce single product page
- Why the post ID is 0 in a hook within wp_insert_post_data?
- How to resolve 500 error in post listing page?
- Function Hooked on Init Running Multiple Times
- set_post_format called after wp_update_post when using bulk edit?
- WP-Automatic to run publish hooks
- WordPress save_post hook not firing when checking if _GET[‘post’] is set
- Access post meta just after publishing
- How to work with hooks and Posts to posts plugin?
- Which hook runs first(init,… or ???) [duplicate]
- Send email to post author 1 day before his project ends
- Object oriented programming, add_action in constructor not firing
- add hook restricted only to either plugins or themes?
- template_redirect and title
- How to hook watchdog script for existence of a WP page?
- Get new (not old) post inside transition_post_status hook
- Using actions, hooks and filters in a non-WordPress page
- get categories the post was in and just been removed from
- addaction hook cause redirection problem
- How to Show Different Information to your authors/contributers
- When is get_currentuserinfo() needed?
- disable publish button until condition is not met
- Hide post completely and still reach it via cURL
- Cannot override hooks.php
- How do I remove an action hook by s2member
- Removing action from template class
- Which hook should I use for this scenario regarding the registration process and account/profile update?
- can’t access dashboard and showing forbidden page
- Remove “enqueued” script from array
- Trouble adding data to options table
- Problem in register activation hook and Copying folder
- Getting all post/page IDs related to a soon-to-be-deleted tag/cat
- theme functions (hooks)
- Hooking get_pages()
- prepopulate form from a hook within wordpress function.php file
- How to hook into publish_posttype?
- Function is Missing an Action Hook
- frontend show edit profile with selected custom options
- Query author’s posts & posts that have author’s id as meta value
- How to access variables in the function where apply_filters() is called?
- Redirect back to origin page after using get_delete_post_link()
- Fire a hook programmatically
- Why does hook priority affects admin menu permission error?
- Change Title Type
- How to change Akismet commenter privacy notice?
- How To Apply Different Styles To All Blocks Based on Post Meta Value?
- PHP Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered
- Transform .wp-video to the native video player of the browser
- How do I override the user’s input when updating a custom post type’s permalink?
- change position of element using hook [closed]
- How to add a new link to the default register form’s footer links?
- The acction hook stop working if i move it from plugin file to theme’s functions.php file
- admin_post hook not working
- $GLOBALS & global doesn’t work [closed]
- How to add action in wordpress custom plugin?
- How can I add new attributes in a Class when my addon is active?
- How to display the category featured images [closed]
- What is meaning of BEFORE and AFTER in this hook name?
- How do I change TinyMCE button “i” to create a i tag rather than em? [duplicate]
- How to use the password_reset hook to validate new password and display error
- Hook action when create new category [duplicate]
- How to display before H1 Title
- add_action failed to display function by a plugin
- Is there any Reference of WordPress hook and hacks? [closed]
- wp_footer content appearing in admin area
- getSaveContent.extraProps hook for core/post-title doesn’t add new attributes on to the frontend
- Thesis Theme -> hooks not working for custom function