wordpress password protected page access link code example
Example: password protected website wordpress
In Wordpress by default there is a option for adding password to the page, just
change the "status & visibility" option from public to password protected