?
Solved

change out Reply button on blog post

Posted on 2013-02-05
18
Medium Priority
?
298 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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 

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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

764 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