Код: Выделить всё
$posttags = get_the_tags();
$tags = '';
if ($posttags) {
foreach($posttags as $tag) {
$tags .= ','.$tag->name;
}
}
$taglist = substr($tags, 1);
$category = get_the_category();
$posts = query_posts('&tag='.$taglist.'&orderby=date&order=DESC&posts_per_page=3&cat='.$category[0]->term_id);
Подробнее здесь: https://stackoverflow.com/questions/175 ... r-category
Мобильная версия