Limit admin access by IP – but all for subscribers – PLEASE HELP


I have a membership site where users that subscribe are automatically categorized as Subscribers and I have limited the amount of control and visibility they have.

Is there a way to limit ADMIN to the wordpress site by IP Address, but somehow still allow all users that are categorized as subscribers to log in from any ip address?

I added the code below to my htaccess file, but that doesn’t allow my subscribers to log in anymore from their own ip addresses, since it still goes through wp-login.php.

<files wp-login.php>

order deny,allow

deny from all

# whitelist Your First IP address

allow from xx.xx.xx.xx


I would really really appreciate some help to figure out if it is possible and if so, HOW, to limit the admin user (as categorized as “admin” in the users list within the admin wordpress panel) to a certain IP address, but still allow all who are categorized as “Subscribers” access from any ip address.

Thank you in advance.