Tag Info

New answers tagged

0

Ok I got it! Here is the code I used: add_action('publish_post', 'custom_auto_featured_image_publish_post',10,2); function custom_auto_featured_image_publish_post($post_id, $post) { // get category of post ID $cat_detail=get_the_category($post_id); $cat_name = array(); foreach($cat_detail as $cd){ $cat_name[] = $cd->cat_name; ...



Top 50 recent answers are included