Md Mehedi Hasan

post_password_required

function alpha_the_excerpt($excerpt){
	if(!post_password_required()){
		return $excerpt;
	}else{
		echo get_the_password_form();
	}
}
add_filter("the_excerpt", "alpha_the_excerpt");