How to remove comment-reply.js from your wordpress site ?

Hello Friends,
I hope you all are doing well!!
If you want to remove “comment-reply.js” file and reduce to number of HTTP request from your wordpress website then don’t worry,  I am going to share my knowledge, so you can do it easily even if you have any technical knowledge or not.
Just add given below code into your function.php file and refresh the page.
// Remove comment-reply.min.js from footer
function remove_comment_reply_js(){
wp_deregister_script( ‘comment-reply’ );
}
add_action(‘init’,’remove_comment_reply_js’);
It will Show only on blog post
// Remove comment-reply.min.js from footer
function remove_comment_reply_js(){
if(is_singular(‘post’)){
// no action
}else{
wp_deregister_script( ‘comment-reply’ );
}
}
add_action(‘init’,’remove_comment_reply_js’);
You can also watch my video for live demo
[youtube https://www.youtube.com/watch?v=WSEmJmRWy5Q]
Enjoy Code

Leave a Reply

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