How To Get Rid Of The Comments Link In The Thesis WordPress Theme

Seen { 23 comments } at the end of a blog post on any wordpress theme? There are good chances that the blog is using the Thesis WordPress Theme. While Thesis is a premium wordpress theme, its comments link is a tell-tale signature of the fact that the premium theme though highly customizable is being just like any other theme without any personal touch or uniqueness in design. Customization is one of the prime powers of Thesis. As such you must explore all the possible options and utilize this feature to give your blog a personal touch. Let’s get rid of the comments link for a start.

In your custom_functions.php file add the following code to get rid of the comments link.

remove_action('thesis_hook_after_post', 'thesis_comments_link');

Or you can introduce your own customized comments link.

function my_comments_link() {
  if (!is_single() && !is_page()) {
    echo '<p><span>[</span> <a href="';
    the_permalink();
    echo '#comments" rel="nofollow">';
    comments_number(__('<span>0</span> comments', 'thesis'), __('<span>1</span> comment', 'thesis'), __('<span>%</span> comments', 'thesis'));
    echo '</a> <span>]</span></p>';
  }
}
remove_action('thesis_hook_after_post', 'thesis_comments_link');
add_action('thesis_hook_after_post', 'my_comments_link');

The above changes the serpentine brackets {} to the square ones []. Now that’s not Thesis, is it? Get a free copy of Thesis WordPress Theme.

Posted In:

WordPress Support & Maintenance, Code Snippets, Thesis WordPress Theme Framework

4 Comments

  1. It might look annoying to some people but if you think otherwise then it also gives an idea of the popularity of the post.More comment means more discussion and more discussion means the post is more popular.So I think that its a good way of showing the popularity of the post ,so why should we remove it.

    Besides Thanks for the effort,I will pass the word to some of people who wants to remove comment link from their post.

    Reply
  2. I appreciate the styling to get away from that telltale Thesis look but then the individual posts still have the same bracket. How would you modify that to also look like the one on the home page?

    Here’s my page example:

    http://www.creative-culinary.com/grapefruit-ginger-and-honey-flank-steak

    Reply
  3. The first section would remove it from the individual pages/posts and the second section from the blog/index page. You can attach your own filter-function to replace these with the kind of brackets you like.

    remove_filter('thesis_comments_intro', 'default_skin_comments_intro');
    
    function custom_skin_comments_link(){return'';}
    add_filter('thesis_comments_link', 'custom_skin_comments_link');
    Reply
  4. How do you remove the comments link from a single page or pages

    Reply

Comment on How To Get Rid Of The Comments Link In The Thesis WordPress Theme

Your email address will not be published. Required fields are marked *