If there are comments, I want to wrap the amount eg "5 comments" in the link to the comments section of the post, but when I add the echo for comments_link it errors.
<?php comments_number( '', '<span class="comment_meta">With:</span> 1 Comment', '<span class="comment_meta">With:</span> <a href="'echo . $comments_link(); . '">% Comments</a>' ); ?>
Think I'm having trouble dipping in and out of php and html. Any help would be very much appreciated.
==== EDIT ====
Not sure if get_comment_count is still used but I've got it working using the below:
<?php $comment_count = get_comment_count($post->ID); ?> <?php if ($comment_count['approved'] > 0) : ?><span class="comment_meta">With: </span><?php comments_popup_link( '', // No comments exist, you would probably want to display a link here in order for people to add the first comment '1 comment', // 1 comment, usually phrased differently '% comments' // > 1 comment ); ?> <?php endif; ?>