• 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 ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • <?php comments_popup_link('<img src="/path/to/nocomment.jpg" />', '<img src="/path/to/onecomment.jpg" />', '<img src="/path/to/manycomments.jpg" />'); ?>

    Thread Starter shadow

    (@shadow)

    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"/>'); ?>

    Thread Starter shadow

    (@shadow)

    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? ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Replacing comment text with an image?’ is closed to new replies.