Solved

change out Reply button on blog post

Posted on 2013-02-05
18
285 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
  • 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
 

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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article discusses four methods for overlaying images in a container on a web page
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now