16
Oct
2023
What is the most effective method for combating the trackback spam that inundates comment sections?
Altering the global Trackbacks configuration through the Dashboard -> Settings -> Discussion will exclusively modify the default behavior.
If you presently have posts or pages with trackbacks enabled, adjusting the default setting won’t affect the individual post-level settings.
To address this issue use the following filter to programmatically disapprove any trackback or pingback:
add_filter('pre_comment_approved',function($approved,$comment){
if( in_array($comment['comment_type'],array(
'trackback',
'pingback',
))){
$approved = false;
}
return $approved;
},999999,2);
You must be logged in to post a comment.
Currently managing RECUWEB an IT Company providing cloud hosting and SaaS delivery model. View all posts by Rafasashi →
nice blog