WordPress.org

Ready to get started?Download WordPress

Forums

raindrops
Remove comments (11 posts)

  1. staralexander
    Member
    Posted 1 year ago #

    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!

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

  3. staralexander
    Member
    Posted 1 year ago #

    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!

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

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

  5. sayed2x2
    Member
    Posted 1 year ago #

    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

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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

  7. sayed2x2
    Member
    Posted 1 year ago #

    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.

  8. nobita
    Member
    Theme Author

    Posted 1 year ago #

    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

  9. staralexander
    Member
    Posted 1 year ago #

    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!

  10. staralexander
    Member
    Posted 1 year ago #

    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?

  11. nobita
    Member
    Theme Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.