I would also like to change the related posts from categories to tags. I check the wordpress codex page, but i am still confused.
Could anyone please tell/guide me the change that need to be done
COPY CODE
//logic for blog posts
if (is_singular('post')) {
//related text
$related_text = __("Related Articles", "kleo_framework");
$categories = get_the_category($post->ID);
if (!empty($categories)) {
$category_ids = array();
foreach ($categories as $rcat) {
$category_ids[] = $rcat->term_id;
}
$args['category__in'] = $category_ids;
}
}
Thanks