Link to home
Start Free TrialLog in
Avatar of Mike Waller
Mike WallerFlag for United States of America

asked on

change out Reply button on blog post

Hi.  I have a site here, http://www.kitchensofdenver.com/spring-cleaning/ and I want to change out the Reply button but can't find the php where that button would be.  It is a wordpress site.  Any ideas experts?
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Change it out how?
Avatar of Mike Waller

ASKER

I have another button I want to replace it with.
Check your theme for a comments.php file and if you have it, look for a form with the submit button.

If you don't see a form, tell me if you have a line that looks like this:

<?php comment_form(); ?>
yes, there is a comments.php file.  I do see this in that file:

<?php comment_form( array('label_submit' => esc_attr__( 'Submit Comment', 'DeepFocus' ), 'title_reply' => '<span>' . esc_attr__( 'Leave a Comment', 'DeepFocus' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s' )) ); ?>
I was afraid of that.  The good news is that the  theme is up to modern standards.  The bad news is that WordPress has made it much more difficult to use an image in place of the button by denying you access to the input tag.

What you can do via the comment_form() function is add a custom ID for the submit button and then use CSS to style it out the rest of the way, including a background image and a different argument to change the text.  

http://codex.wordpress.org/Function_Reference/comment_form

id_submit allows you to change the ID for CSS

label_submit changes the text.
Okay, using the line of code below, where would I add in that ID to add the background image?

<?php comment_form( array('label_submit' => esc_attr__( 'Submit Comment', 'DeepFocus' ), 'title_reply' => '<span>' . esc_attr__( 'Leave a Comment', 'DeepFocus' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s' )) ); ?>
<?php comment_form( array('id_submit' => esc_attr__( 'mynewID', 'DeepFocus' ),'label_submit' => esc_attr__( 'Submit Comment', 'DeepFocus' ), 'title_reply' => '<span>' . esc_attr__( 'Leave a Comment', 'DeepFocus' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s' )) ); ?>

Then make all further modifications in styles.css for #mynewID
Okay great.  i'll try that.
Okay, I tried that but it only affected the Reply button after you click on the Reply on an existing comment.  You can see here http://www.kitchensofdenver.com/spring-cleaning/

So there appears to be 2 Reply buttons.  Also, my Reply graphic is a .png file with transparent background but it is showing up with borders and a shadow around it? Can that be removed with the css style?  I have it as:

#mynewID {
background: url(/images/reply.png) no-repeat;
width: 74px;
height: 35px;
}
Any idea how to swap out that other Reply button graphic?
Sorry, been slammed IRL.  Will catch up to this over the weekend.
Okay, no problem.  Thanks Jason
Hi Jason.  just checking in to see if you had any further idea on this one.
hi there. just checking in to see if there was a solution to this question.
Aargh.  So sorry...this got lost in the shuffle.

Let me take a second look when I get home.
Okay, thanks Jason, I appreciate that.
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Okay, thanks Jason.