How to make all post in to a category?

First query all post $args = array( ‘post_type’ =>’posts’, ‘post_status’ =>’publish’, ‘posts_per_page’ =>-1 ); $query = new WP_Query($args); $post_ids = array(); if($query->have_posts()){ while ($query->have_posts()){ global $post; $query->the_post(); array_push($post_ids,$post->ID); } } Now you have an array called $post_ids which contains all post’s id . Now , change the categories Loop through the array and change the … Read more