how to call the category of the post
Well first off, that code’s a mess to read, some formatting would definitely help get you an answer. That said, here’s the documentation on WP_Query and some sample code to boot $args = array( ‘post_status’ => ‘publish’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => ‘your_cat_slug’ ) ) ); $posts = … Read more