Login based on roles

By: Michael Atkinson | Asked: 04/27/2025
ForumsCategory: How-toLogin based on roles
Michael Atkinson asked 3 weeks ago

Hi

I don't want anyone with a WP user role - admin, editor etc to be able to login via the frontend [frm-login] form.

I have two other roles set up, e.g. role-1 and role-2 and I only want those roles to be able to login using the frontend login form.

Is there a way to do this out the box?

Thanks

2 Answers
Rob LeVineRob LeVine Staff answered 3 weeks ago

Use WP's authenticate filter - https://developer.wordpress.org/reference/hooks/authenticate/. It's not "out of the Formidable box", but there's no such feature for Formidable especially since the Formidable login UI is just going through WordPress's login anyway.

Michael Atkinson replied 2 weeks ago

Thanks, I'll take a look at that.

Erik Meeder answered 2 weeks ago

If you have access to your functions.php file (preferably in a child theme) then this is quite easy to manage with some basic php code.Just ask CoPilot (or other AI) exactly what you want and you should be able to implemented this within a couple minutes. 

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right