Title: using UM hook
Last modified: December 15, 2020

---

# using UM hook

 *  Resolved [buging](https://wordpress.org/support/users/buging/)
 * (@buging)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/using-um-hook/)
 * Hi,
    I’m using this snippet to add something to the login form add_action( ‘um_after_form’,‘
   my_after_form’, 10, 1 ); function my_after_form( $args ) { // your code here }
 * It works fine, however, it also adds the same to the registration form.
 * How could I use this hook only for the login form?
 * Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [intarwebsdeveloper](https://wordpress.org/support/users/intarwebsdeveloper/)
 * (@intarwebsdeveloper)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/using-um-hook/#post-13790858)
 * You can use is_page() conditional so your hook only activates on whatever page
   you have the login form on.
 * Example:
 *     ```
       <?php 
       if (is_page('login')) {
          my_after_form();
       }
       ?>
       ```
   
    -  This reply was modified 5 years, 3 months ago by [intarwebsdeveloper](https://wordpress.org/support/users/intarwebsdeveloper/).
      Reason: added example
 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/using-um-hook/#post-13790943)
 * Hi [@buging](https://wordpress.org/support/users/buging/)
 * Have you tried using the following action hook?
 * `um_after_login_fields`
 * Regards,
 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/using-um-hook/#post-13806507)
 * Hey there!
 *  This thread has been inactive for a while so we’re going to go ahead and mark
   it Resolved.
 * Please feel free to re-open this thread by changing the Topic Status to ‘Not 
   Resolved’ if any other questions come up and we’d be happy to help. 🙂
 * Regards,

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘using UM hook’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/using-um-hook/#post-13806507)
 * Status: resolved