How to remove "Comments are Closed"

Discussion in 'WordPress' started by blueboxer, Jan 26, 2010.

  1. #1
    I have a great theme installed by woothemes but I am trying to remove the "Comments are Closed" boxes that appears on pages and posts.

    The site I am creating is going to be used as a corporate site and not for blogging so comments are not needed. The code is below.

    I would like to just put something around the code to remove it just incase the owners wants to start blogging on it in he future. Can you tell me what I need to change? I know nothing about PHP. Thanks peoples!

    This is the page template code. Here is a link to preview the theme if needed!
    http://ee.woothemes.com/?name=bueno
     
    blueboxer, Jan 26, 2010 IP
  2. Wp-Mod.Com

    Wp-Mod.Com Peon

    Messages:
    381
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try opening comments.php and search for the term you get in that page and just delete it , so when comments are closed it will not show any thing at all
     
    Wp-Mod.Com, Jan 26, 2010 IP
  3. blueboxer

    blueboxer Active Member

    Messages:
    1,421
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    80
    #3
    This theme is different. It puts a nice box where the comments go.

    If you look at the link above you will see it. I've tried for like 4 hours yesterday with no luck. Any ideas?
     
    blueboxer, Jan 27, 2010 IP
  4. craiger22

    craiger22 Well-Known Member

    Messages:
    1,472
    Likes Received:
    99
    Best Answers:
    0
    Trophy Points:
    170
    #4
    I just downloaded the theme, and the file you have mentioned is the index file. Are you refering to where it says comments closed on the homepage?

    If so, then you will need to edit /includes/theme-comments.php
     
    craiger22, Jan 27, 2010 IP
  5. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280
    #5
    From the file that you just posted, remove this snippet of code:
    <?php comments_template(); ?>

    You can remove that from page.php, and single.php to remove the comments template from both posts and pages.
    In the future if your client wants to start blogging either replace that code or just install the original file, or at the very least refer to it so that you will know where to replace the code.
     
    hmansfield, Jan 27, 2010 IP
  6. blueboxer

    blueboxer Active Member

    Messages:
    1,421
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    80
    #6
    Thanks Hmans.

    I worked on the page.php, but not on the single.php

    Here is the code for single.php

    I tried to delete what I bolded below, but that messed up the template and didnt' remove the comment area.

     
    blueboxer, Jan 28, 2010 IP
  7. Wp-Mod.Com

    Wp-Mod.Com Peon

    Messages:
    381
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #7
    try searching this in your comments.php

    <?php else : // comments are closed ?>
    			<!-- If comments are closed. -->
    			
    			<div id="comments">
    			
    				[COLOR="Red"]<p class="nocomments"><?php _e('Comments are closed.', 'woothemes') ?></p>[/COLOR]
    				
    			</div><!-- /#comments -->
    
    		<?php endif; ?>
    
    Code (markup):
    delete the line in red
     
    Wp-Mod.Com, Jan 28, 2010 IP
  8. craiger22

    craiger22 Well-Known Member

    Messages:
    1,472
    Likes Received:
    99
    Best Answers:
    0
    Trophy Points:
    170
    #8
    Try just commenting out the PHP like this:

    <?php // comments_template('', true); ?>
     
    craiger22, Jan 28, 2010 IP
  9. blueboxer

    blueboxer Active Member

    Messages:
    1,421
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    80
    #9
    Hi craiger22 I tried that before with no luck. :(

    wp-mod - No luck either :(
     
    blueboxer, Jan 28, 2010 IP
  10. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280
    #10
    Can't you just change this:
    <?php // comments_template('', true); ?>

    To this:
    <?php // comments_template('', false); ?>

    If not, try removing this:
    <span class="head"><?php _e('Comments', 'woothemes') ?></span>
    <span class="body"><?php comments_popup_link(__('0 Comments', 'woothemes'), __('1 Comment', 'woothemes'), __('% Comments', 'woothemes')); ?></span>
     
    hmansfield, Jan 29, 2010 IP
  11. DomainDomain

    DomainDomain Active Member

    Messages:
    898
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    78
    #11
    If really stuck comment out everything between the header and footer and slowly turn things back opn, 1 by one,
    DD
     
    DomainDomain, Jan 31, 2010 IP
  12. Mack45

    Mack45 Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    You can turn the comments off on the page just below the editor box or set it different for each page.
     
    Mack45, Jan 31, 2010 IP