Can someone please shed some light into echoing html when it contains php functions? I am trying to echo out the following but cannot find a useful reference.
<a href="<?php comments_link(); ?>"><?php comments_number('<span class="nocomments">comments</span>', '<span class="onecomment">1 comment</span>', '<span class="morecomments">% comments</span>'); ?></a>
Grateful for any help!
Updated the code below, I hope I am making myself clear. If the comments don't open/have been closed I am trying to echo out the else condition as text.
<?php
if ( comments_open() ) :
echo '<p>';
comments_popup_link( '<span class="one-comment">leave a comment</span>', '<span class="one-comment">1 comment</span>', '<span class="more-comments">% comments</span>', '');
echo '</p>';
else
echo
the following:
<a href="<?php comments_link(); ?>"><?php comments_number('<span class="zerocomments">comments</span>', '<span class="onecomment">1 comment</span>', '<span class="morecomments">% comments</span>'); ?></a>
comments_popup_linkfunction will display the number of comments. If comments are closed thecomments_numberfunction will account for showing the correct count, which isn't possible with thecomments_popup_linkalone.