Solved

change out Reply button on blog post

Posted on 2013-02-05
18
297 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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 

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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

729 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