Can anyone tell me how you go about replacing the text 'Comments' with a linking image instead?
<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
Thanks if you can help :)
Can anyone tell me how you go about replacing the text 'Comments' with a linking image instead?
<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
Thanks if you can help :)
<?php comments_popup_link('<img src="/path/to/nocomment.jpg" />', '<img src="/path/to/onecomment.jpg" />', '<img src="/path/to/manycomments.jpg" />'); ?>
Thanks Kafkaesqui - much appreciated :)
May I suggest you to also add the alt attribute for validation purposes ?
Something like
<?php comments_popup_link('<img src="/path/to/nocomment.jpg" alt="No comment" />', '<img src="/path/to/onecomment.jpg" alt="One comment"/>', '<img src="/path/to/manycomments.jpg" alt="Many comments"/>'); ?>
A good suggestion chienservant :)
Already added - thanks :)
hey cool. i have the same problem now.
the thing is, the image i want is in my theme directory. i tried using <?php bloginfo(stylesheet_directory); ?> inside <?php comments_popup_link...> like this:
<?php comments_popup_link('<img src="<?php bloginfo(stylesheet_directory); ?>/icons/comments.png">, (and so on...)
but it doesn't work. any ideas? :D
This topic has been closed to new replies.