Password protect template page
-
Hi,
I have created a custom category template page to display posts of a certain category in a particular way – that’s all working fine. However, I want to make this category template a password-protected area of the site, as well…
Because you don’t edit templates in WordPress’s dashboard itself, and so you can’t simply select ‘Protected’ with the radial buttons as you would for a single page or post, I’ll need to do this in the PHP file I have created for this particular template.
What is the PHP code I will need to include in this file to make it behave like an ordinary password-protected page?
- The topic ‘Password protect template page’ is closed to new replies.