WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Change "Leave Reply" to an image (2 posts)

  1. spitfire72
    Member
    Posted 1 year ago #

    I am using a child theme of Twenty Twelve. I want to replace "Leave a Reply" with a small gif. Looking at the 'content.php' file, I found the code I need to edit. But how do I insert an image? I'm html and css savvy, but php always gets me. Here's the line I need to edit...

    <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>

    Instead of "leave a reply" I want it to show this image:
    http://www.motherthink.com/wp-content/uploads/2013/01/braincloud.gif
    I know how to do it in css but then it would just be a bg image.

    Thanks!

  2. cadfile
    Member
    Posted 1 year ago #

    where you see:

    _('Leave a reply', 'twentytwelve')

    Replace the text Leave a reply with the full link to your image:

    _('<img src="http://www.motherthink.com/wp-content/uploads/2013/01/braincloud.gif" />', 'twentytwelve')

    It worked fine in my Local Host install and you can then control the style through css using class "leave-reply"

Topic Closed

This topic has been closed to new replies.

About this Topic