Solved

change out Reply button on blog post

Posted on 2013-02-05
18
288 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
This article discusses four methods for overlaying images in a container on a web page
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
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 …

930 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

8 Experts available now in Live!

Get 1:1 Help Now