It at least is outputing everything, but I can’t figure out why it’s not in the right order.
I have a feeling it is similar to this issue, but still don’t understand.
http://wordpress.org/support/topic/printf-weirdness-with-comment_author_link
yes, it is related:
http://codex.wordpress.org/Function_Reference/comments_number
comments_number()
outputs the result; in your context you need to use get_comments_number()
http://codex.wordpress.org/Template_Tags/get_comments_number
with the added complications
and you also need to use this as the fourth variable for you printf:
something like:
printf( __( '%2$s <span class="meta-sep">by</span> %3$s, %4$s', 'twentyten' ),
(@bzmillerboy)
13 years, 4 months ago
I’m customizing the starkers theme which re-uses a lot of the twentyten functions. I’d like to display the post meta data using this modified twentyten_posted_on() function.
For some reason it’s outputs “No CommentsOctober 6, 2010 by bzmillerboy” instead of “October 6, 2010 by bzmillerboy No Comments”.
I finally had to pull the comments_numbers out of the functions.php and put it after the function on the single.php, like this.
<?php twentyten_posted_on(); ?> <?php comments_number('No Comments', '1 Comment', '% Comments') ?>
Any suggestions on how to get this to work within the function?