This is not quite an issue ticket, but more an inquiry. I would like to know if it's possible and if it is, how can I add some other roles for the Maintenance mode? I would like on my site, when the maintenance mode is on, the authors to be able to see the website as well, so the maintenance page will be displayed only for the visitors.
I've looked through functions.php and extras.php, but I'm not sure where I can edit the function "$except_admin" to add also the author role.
Hi guys,
This is not quite an issue ticket, but more an inquiry. I would like to know if it's possible and if it is, how can I add some other roles for the Maintenance mode? I would like on my site, when the maintenance mode is on, the authors to be able to see the website as well, so the maintenance page will be displayed only for the visitors.
I've looked through functions.php and extras.php, but I'm not sure where I can edit the function "$except_admin" to add also the author role.
Thank you very much!
Kind regards,
Marius
Hi, Marius.
See here how to check if current user is author - http://wordpress.stackexchange.com/questions/5047/how-to-check-if-a-user-is-in-a-specific-role
So, to show website for authors you should extend condition in function youplay_is_maintenance in extras.php file. For now it checked for admins only:
Best regards, nK.
Rate our Works: https://themeforest.net/downloads
Follow on Twitter: https://twitter.com/nkdevv
Hi Nikita,
I've tried the following code in the extras.php, but apparently, it simply doesn't work. It doesn't recognize my author role.
Please let me know your thoughts. Many thanks!
Kind regards,
Marius
Example:
Rate our Works: https://themeforest.net/downloads
Follow on Twitter: https://twitter.com/nkdevv
Hi Nikita,
Perfect!!! Love you big time. Many thanks!
Kind regards,
Marius