Title: Adding custom action
Last modified: April 28, 2017

---

# Adding custom action

 *  [moviemaniac](https://wordpress.org/support/users/moviemaniac/)
 * (@moviemaniac)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/adding-custom-action/)
 * I am using iThemes and I would like to know if it is possible to add a custom
   action (in the functions.php file within the theme folder) to add particular 
   behaviour.
 * For example, the plugin allows to authomatically ban IPs when someone attempts
   to login as admin.
    Looking at the plugin log I’ve noticed that someone is trying
   to login using some odd usernames, always the same. One is not a registered username
   onto my site, another yes. So I would like to authomatically ban IPs using these
   usernames in the following cases: always if the user is ont registered, everytime
   the login fails if the user is registered.
 * I know that it is not a common feature and even not advisable, but my website
   has a few members, and they are not going to change in the future, registration
   is not allowed. I am even ready to pay the consequences of some extra work.
 * Thanks

The topic ‘Adding custom action’ is closed to new replies.

 * ![](https://ps.w.org/better-wp-security/assets/icon.svg?rev=2980272)
 * [Solid Security – Password, Two Factor Authentication, and Brute Force Protection](https://wordpress.org/plugins/better-wp-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-wp-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-wp-security/)
 * [Active Topics](https://wordpress.org/support/plugin/better-wp-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-wp-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-wp-security/reviews/)

## Tags

 * [custom action](https://wordpress.org/support/topic-tag/custom-action/)

 * 0 replies
 * 1 participant
 * Last reply from: [moviemaniac](https://wordpress.org/support/users/moviemaniac/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/adding-custom-action/)
 * Status: not resolved