You can write below code in your theme’s function.php file:
function show_tags_description()
{
$post_tags = get_the_tags();
$separator = ‘, ‘;
if (!empty($post_tags)) {
foreach ($post_tags as $tag) {
$output .= ‘term_id) . ‘”>’ . $tag->name . ‘‘ . ‘<p>’ . $tag->description . ‘</p>’ .$separator;
}
return trim(($output), $separator);
}
}
After that, wherever you want to place tags and description, you have to add below code:
if ( is_singular() ) :
echo show_tags_description();
endif;
Please let me know if any query.
Thanks.
]]>$output .= ‘term_id) . ‘”>’ . $tag->name . ‘‘ . ‘<p>’ . $tag->description . ‘</p>’ .$separator;
“syntax error, unexpected ‘,'”
]]>Yes, sorry it was type mistake in editor. Please try code as attached screenshot in below link:
https://ufile.io/gnm65s97
Please let me know if still any issue.
Thanks.
]]>