• staralexander

    (@staralexander)


    On the Raindrops Theme.
    Please tell me how to remove the code so that comments do not show up on any pages.
    I attempted to do so first from the Dashboard in the Settings (under Discussion) I unchecked the “Allow People to Post comments” but that doesn’t work!

    Thank you!

Viewing 10 replies - 1 through 10 (of 10 total)
  • WPyogi

    (@wpyogi)

    Thread Starter staralexander

    (@staralexander)

    No, actually I want to do the opposite!

    The site I’m working on is http://www.designingawareness.com

    The client doesn’t want people to leave a reply. NO COMMENTS PLEASE!

    WPyogi

    (@wpyogi)

    Yes, I’m aware of that – did you check all those settings to be sure they are OFF in those settings?

    sayed2x2

    (@sayed2x2)

    You can remove that from your raindrop theme, go to Appearance>Editor and look for page.php file on the right side of the page and search this bit of code <?php comments_template( ”, true ); ?> . Replace this code with this(you just have to comment it out.)
    <?php //comments_template( ”, true ); ?>

    and the comment will go away . whenever you want to activate comments again just remove these two backslashes

    WPyogi

    (@wpyogi)

    If you want to do the above, please be sure to use a child theme – otherwise your changes will be overwritten when the theme is updated…

    http://codex.wordpress.org/Child_Themes

    sayed2x2

    (@sayed2x2)

    Creating a child theme is always a good idea but Its just a matter of two backslashes, if the theme gets update she can do it again.

    Theme Author nobita

    (@nobita)

    Hi staralexander

    Are you need remove comments ?

    Using Raindrops child theme.

    Example code below , but I’m not test. You must do test.

    Create file child-theme/comments.php
    code below.

    <?php
    return;
    ?>

    Create filter child-theme/functions.php
    code below.

    /* remove posted on comment link */
    add_filter( 'raindrops_posted_on', 'my_theme_remove_comments' );
    <?php
    function my_theme_remove_comments( $posted_on ){
    
    	$regex = '!<a href="([^"]+)" class="raindrops-comment-link">(.*)?</a>!';
    	$result = preg_replace( $regex, '', $posted_on );
    
    	return $result;
    }
    ?>

    Thank you.

    Aside

    /* Raindrops No need import rules like below*/
    @import url('../twentyten/style.css');

    Automatic include

    Thread Starter staralexander

    (@staralexander)

    Thanks to you all who responded, especially. sayed2x2!
    I knew there was a place to edit out the comments, that it should be an easy fix… I just didn’t know which .php file it was… Thanks so much!

    Thread Starter staralexander

    (@staralexander)

    So, I am a little confused as to whether I

      need

    to create a child theme. It seems this may be the case…

    I have another site that I made a month or so ago, (also using the Raindrops theme) so if I have to create a child theme, and I want everything to stay the way it is now, can I just make a total copy of the current ‘parent’ theme so that all my changes are included in the new child theme?

    Theme Author nobita

    (@nobita)

    make a total copy of the current ‘parent’ theme so that all my changes are included in the new child theme?

    Full copied Raindrops child theme may be work.

    copied Raindrops style.csss chenge below.

    Template: raindrops

    But above setting is equal ‘not update’.

    I want you to minimize.

    Full copied child theme check is not each update testing.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Remove comments’ is closed to new replies.