* @package WordPress * @subpackage shmedia * @since shmedia 1.0 */ get_header(); $cta = get_queried_object(); $id = $cta->cat_ID; ?> <div class="sidebarAllBlog"> <div class="blogCont"> <?php $tag = single_tag_title("", false); pagination(); $pagination = new Pagination(4, 'whats-new'); $pagination->counterCat(); $pagination->_setPagination(); $args = array('post_type' => 'post', 'category' => $id, 'posts_per_page' => $pagination->limit, 'offset' => $pagination->start, 'order' => 'DESC', 'suppress_filters' => 0, 'tag' => $tag); $posts = get_posts($args); foreach ($posts as $post) { $ID_r = $post->ID; // var_dump(wp_get_post_tags($ID_r)); $content_post = get_post($ID_r); $content = $content_post->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); $author_id = $post->post_author; $category = get_the_category($ID_r); $catName = $category[0]->cat_name; $catSlug = $category[0]->slug; $blog = ''; $blog .= '<div class="blogPost">';