WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Replacing the Number of comments link with an image (2 posts)

  1. michaelzil
    Member
    Posted 5 years ago #

    1. I have created animated GIF files named 0.gif, 1.gif ,2.gif etc. up to 20.gif
    2. One more GIF file called Comments.gif.

    I would like to replace the standard PHP statement:

    <?php comments_popup_link( 'No comments yet', '1 comment', '% comments so far', 'comments-link', 'Comments are off for this post'); ?>
    With another statement as follows:
    When there are no comments, there should a combination of 0.gif+ Comments.gif and there should be a link to the standard comments option ($imglink)
    When there is one comment, there should a combination of 1.gif+ Comments.gif and there should be a link to the standard comments option ($imglink)

    … and so on for the rest of the comments.

    Can anyone help me with the PHP statement?

  2. michaelzil
    Member
    Posted 5 years ago #

    Solved: this is how it was done:
    <?php comments_popup_link(__('<img src="0.gif">'), __('<img src="1.gif">'),> __('<img src="%.gif"> '));?>

Topic Closed

This topic has been closed to new replies.

About this Topic