Sorting Users page admin column with ACF field

You can use the “pre_user_query” filter hook to modify the query that retrieves the users. Here’s an example code that how to sort the Users page admin column with an ACF field named. function sort_users_by_acf_field( $query ) { if ( ! is_admin() ) { return; } if ( isset( $query->query_vars[‘orderby’] ) && ‘user_company_name’ === $query->query_vars[‘orderby’] … Read more

AJAX call not initializing for non-admins in WordPress

There are several potential reasons for this issue: Permissions: Non-admin users may not have the necessary permissions to access the admin-ajax.php file, which is being called in your AJAX request. Make sure that the required permissions are set for the user roles other than admin. Authentication: Non-admin users may not be authenticated to access the … Read more

How to handle WordPress account for terminated employee

In general, an account for an employee that has ‘moved away’ (for any number of reasons) should have their access privileges immediately downgraded. I would also change their password to prevent access. There are many instances of a former employee still having access, and doing improper things to the business computer systems. When an employee … Read more