I want to display the number of comments a particular post has, so i thought i'd use comments_number, however when i use this the comment number gets printed outside of the span it's supposed to be contained within.
I tried using get_comments_number too, but that instead displays nothing at all.
The code below has been added to my functions.php amongst other code, but i just cannot get the comment number to display inside the span - it just prints at the top of the page.
$content .= '<p class="meta"><span class="date">'.$date.'</span><span class="comments">'. comments_number() .'</span></p>';