Delete spam comments after three (3) days

JanR/ January 14, 2019/ WordPress Documentation/ 0 comments

How to change Akismet interval to three days instead of 15 days for deleting spam comments.

Add to your theme’s functions.php or site-specific plugin file:

add_filter( 'akismet_delete_comment_interval', 'custom_set_delete_interval' );
function custom_set_delete_interval() {
        return 3;
}

This changes Akismet’s interval to 3 days, after which comments held as spam are deleted.

Share this Post

Leave a Comment

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*