• Resolved buging

    (@buging)


    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)
  • 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 4 years, 2 months ago by intarwebsdeveloper. Reason: added example
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @buging

    Have you tried using the following action hook?

    um_after_login_fields

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    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.