free hit counters
If you are using Internet Explorer as your browser please be running at least IE 7 or above. This site does not support IE 6 or below. Go here for the latest free version including easy download and installation instructions If you want to make it real easy on yourself, download Firefox , the most popular browser in the world. It's free and simple. You'll be so glad you did.
May
3
2009

Change “leave a comment” text to something else

You can make the comment heading say whatever you want…

157

158

First thing to do is get rid of the original heading. In your custom.css file add this…

.custom #respond_intro p {display: none;}

Next, your going to create a function to add a new heading. In your custom_functions.php file create the function. Give the div a class name so you can style it later in your custom.css…

function comment_heading (){?>
<div class="comment-heading"></div>
<?
}

Next, figure out what you want the heading to say and type it in between the two <div> tags…

function comment_heading (){?>
<div class="comment-heading">Here’s a new comment heading</div>
<?
}

Now, place that whole function with a hook after the post box…

function comment_heading (){?>
<div class="comment-heading">Here’s a new comment heading</div>
<?
}
add_action(’thesis_hook_after_post_box’ , ‘comment_heading’);

Next, in your custom.css your going to style the heading using the class name that you gave it which, in this case, is comment-heading. You can name it whatever you want. Here are the basic styles I used but you can style it however you like…

.custom .comment-heading { font-size: 2.3em; margin-bottom: -1em; padding: 1em;}

Leaving a comment with code in it...

If you would like to leave a comment and you have examples of code you want to show, you must "escape the code". This allows the entire code to show correctly by inserting certain variable around certain tags to make them show. If you don't "escape the code" your code will show up broken, mangled, and it won't be able to be seen correctly. "Escaping the code" is very simple...

  1. Copy your code you want to show
  2. Click here to go to the site to escape the code
  3. Follow the directions, it's so easy
  4. Once you have the escaped code copied, paste it in the comments area where you want
  5. Now you can enjoy life


Go ahead, leave a comment...

{ 9 comments… read them below or add one }

Ray May 5, 2009 at 4:52 am

Hi there,

Your site is a great resource for Thesis users! Many thanks for your time and effort.

Regards,

Ray

Reply

Ari Herzog May 6, 2009 at 11:11 am

Hmm. I tried your code above, but it didn’t give me anything; left the replacement text as blank. Weird.

Also, how come you don’t have a “subscribe to comments” plugin? ;)

Reply

Nasty May 6, 2009 at 2:02 pm

Did you cut and paste the code? Sometimes when you do this it changes the quotes in the code. Make sure the quotes are straight up and down and not at an angle. This code has worked beautifully before for other people. Makes me wonder if you have a small typo somewhere. Do you have a link to your site?

I haven’t experimented with any comment plugins. I’m just trying to show people how to customize on their own.

Reply

This Eclectic Life May 11, 2009 at 11:23 am

I’ve tried several of the hooks you have described, but my server won’t let me save it. Says that there are characters that can’t be mapped. I’m sure, as you said, that it has to do with changing the quotes (though I’m in a text editor). Even after changing the quotes, it wouldn’t save for me.

Reply

Nasty May 11, 2009 at 4:56 pm

That’s strange, the code definitely works. Make sure the single and double quotes go straight up and down, and not at an angle. You’re uploading to the appropriate file…

wp-content/themes/thesis/custom/custom_functions.php

I would highly recommend getting aptana studio. It’s free, it uses colors, and it tells you if you have a typo, like the wrong brackets, or quotes, etc.

Reply

Lon May 15, 2009 at 8:54 am

works great, other than whenever you look at a ‘category’ page, the new comment dialog appears below every post excerpt!

Reply

Nasty May 15, 2009 at 9:12 am

Do you want comments shown on your excerpts on your category pages?

Reply

anne May 18, 2009 at 7:32 pm

Hello
Even though I have disabled comments through Thesis Options, I am still getting “Comments on this entry are closed” appearing at the bottom of each post. How can I remove this, I cannot figure out where this code resides and how to go about removing it.
Thanks for any help!
Anne

Reply

Nasty May 19, 2009 at 10:45 am

In your custom.css put this..

.custom .comments_closed p {display: none;}

Reply

Leave a Comment

Previous post: Multimedia box, feature box, it’s all the same

Next post: The absolute easiest way to add your own header image