Copy the contents above into a file named wp-admin-ban.php (put them between ) and move it to wp-contents/mu-plugins folder. If the mu-plugins folder doesn’t exist, create it. This will be available across any theme on your site.

Copy the code to your theme’s functions.php file, which restricts functionality to that theme.

If you can think of a good membership plugin on the wordpress repo that does the trick, feel free to drop me a line!

On that note, here’s two plugins you might find useful:

My own ajax login plugin so users can log in and register with smooth ajax effects from the front of your site!

Membership Plugin If you’re looking for a good premium membership plugin with great support (personally recommended, tried a few others before it). They also have a lite free version for you to try out.