Solved

change out Reply button on blog post

Posted on 2013-02-05
18
296 Views
Last Modified: 2013-03-18
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?
0
Comment
Question by:COwebmaster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 7
18 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 38857245
Change it out how?
0
 

Author Comment

by:COwebmaster
ID: 38857271
I have another button I want to replace it with.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 38857300
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(); ?>
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

Author Comment

by:COwebmaster
ID: 38857326
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' )) ); ?>
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 38857385
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.
0
 

Author Comment

by:COwebmaster
ID: 38857928
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' )) ); ?>
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 38857953
<?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
0
 

Author Comment

by:COwebmaster
ID: 38858023
Okay great.  i'll try that.
0
 

Author Comment

by:COwebmaster
ID: 38864384
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;
}
0
 

Author Comment

by:COwebmaster
ID: 38867900
Any idea how to swap out that other Reply button graphic?
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 38870493
Sorry, been slammed IRL.  Will catch up to this over the weekend.
0
 

Author Comment

by:COwebmaster
ID: 38870554
Okay, no problem.  Thanks Jason
0
 

Author Comment

by:COwebmaster
ID: 38903287
Hi Jason.  just checking in to see if you had any further idea on this one.
0
 

Author Comment

by:COwebmaster
ID: 38964399
hi there. just checking in to see if there was a solution to this question.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 38964502
Aargh.  So sorry...this got lost in the shuffle.

Let me take a second look when I get home.
0
 

Author Comment

by:COwebmaster
ID: 38964514
Okay, thanks Jason, I appreciate that.
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 38964551
So there appears to be 2 Reply buttons

Sort of.  The reply buttons under the existing comments are actually a modified a tag and not an input:

<a onclick="return addComment.moveForm(&quot;comment-92&quot;, &quot;92&quot;, &quot;respond&quot;, &quot;1320&quot;)" href="/spring-cleaning/?replytocom=92#respond" class="comment-reply-link">Reply</a>

So the class you need to find and modify is "comment-reply-link" but a tags behave a little differently than input tags, so watch out for wacky behavior.

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;
} 

Open in new window


Yes, just add border: none

#mynewID {
background: url(/images/reply.png) no-repeat;
width: 74px;
height: 35px;
border: none;
} 

Open in new window

0
 

Author Comment

by:COwebmaster
ID: 38997476
Okay, thanks Jason.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question