How can I hide my blog from people?
Answer / Shubham Kaushik
To make your WordPress site private or hidden, you can either set it to password-protected or limit access by user roles. To set a password for your site, navigate to Settings > General in your WordPress dashboard and provide the new password under 'Site Address (URL)'. If you want to restrict access based on user roles, create a custom function in functions.php and use the appropriate code snippet to specify the roles that should be granted access.nn```phpn// Function to redirect non-admin usersnfunction my_redirect_non_admins() {n if (!current_user_can('administrator')) {n wp_redirect(site_url('/login'));n exit;n }n}nadd_action('template_redirect', 'my_redirect_non_admins');n```
| Is This Answer Correct ? | 0 Yes | 0 No |
Is wordpress a security risk?
Tell me how do I disable trackbacks and pingbacks?
Explain, are the objects passed by value or by reference?
What is the difference wordpress.com vs wordpress.org?
What is an sql file?
How do I turn on automatic updates for wordpress?
Why You Should Use WordPress?
How do I set up a web page?
What's the difference between bluehost and wordpress?
Can we set specific page to be displayed as homepage and different for blog posting in wordpress cms?
Explain me what are the custom fields in wordpress? How to display it?
Can I use a database other than mysql?