Another post in our series on Creating Azure (hosted) WordPress Websites without knowing PHP or MySql!
This website is built exactly the same as the Page-Centric Private Wiki outlined in an earlier post, but with some additional changes to the UI functionality. Follow all the directions from Page-Centric Private Wiki adding in the additional functionality outlined here.
This is a read-only private website, with all registered users having the Subscriber role. Each registered Subscriber has access to all the pages on the website but does not have access to the WP Default Tool Bar and their WP Profile page. All Subscribers are registered by the website Administrator and given strong passwords that they are encouraged to change on their first login.
This is the landing page of the Private Support Portal for all registered Subscribers. Like the private intranet wiki, the website content is locked behind the login page and is not accessible by the public. This is client support portal provided by a vendor for supporting the vendor’s product to their clients.
Minor Change to Custom Login Page
The Custom login page does have the WP default ‘Lost your password?’ text message below the login box. This feature is used so that Subscribers can still change their password without being able to access their WP Profile page, which has been disabled to hide the standard WordPress platform identifiers from Users.
While the iThemes Security plugin installed on the website is setup to automatically log a user out after 20 minutes of inactivity, the logged-in user can still log themselves out if desired:
For a Subscriber to change their password, they activate the default ‘Lost your password?’ feature of WordPress, an email is sent to them to create a new password:
Remove Dashboard and WordPress Tool Bar Access
To disable the WordPress tool bar and access to the WordPress Dashboard by Subscribers, the Remove Dashboard Access plugin is used. Dashboard User Access is limited to Editors and Administrators only and the User Profile Access is not checked so the WordPress Profile page is also blocked.
To remove the default WP black bar that runs across the top of every WordPress site add the script below to the child-theme’s functions.php file (accessible by Kudu as outlined here).
/*Hide Admin bar for Subscribers and Authors*/
function hide_admin_bar( $show ) {
if ( current_user_can( 'subscriber' ) || current_user_can( 'author' ) ) :
return false;
endif;
return $show;
}
add_filter( 'show_admin_bar', 'hide_admin_bar' );
Before copying and pasting script into the child-theme’s functions.php file – note the distracting WP black Admin bar
running across the top of the UI:
After the script has been pasted and the changes saved – no WP black WP tool bar is visible or accessible to logged in users:
All of this could be used to set up a public support portal as well, just eliminating the use of the All-In-One-Intranet plugin to lock down the website to pre-registered users only.