Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @legalmartin

    Unfortunately, there’s no filter hook to add classes to it. But you can add <div></div> tags before and after the UM Register shortcode in the Edit page.

    e.g.

    <div class="um-custom-register-form">
    [ultimatemember form_id="1059"]
    </div>
    

    Regards,

    Thread Starter legalmartin

    (@legalmartin)

    Hello,

    This is going to give a class to the whole Register form (for non-logged in users), whereas I only wish to style the “You are already registered” message for logged-in users.

    In which php page is this message set up?

    Regards,

    Martin

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Thread Starter legalmartin

    (@legalmartin)

    Hello,

    I have found “You are already registered” in Poedit.

    Can I style this text in Poedit?

    It seems this far that I can only change the words, into for instance “You are still registered”, which is not the desired effect.

    Regards,

    Martin

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @legalmartin

    I suggest that you make the text empty with &nbsp in the translation file.

    and then use this shortcode to display your custom text like this:

    [um_loggedin] 
    <div class="myclass">
    You are already registered.
    </div>
    [/um_loggedin]

    Regards,

    Thread Starter legalmartin

    (@legalmartin)

    Hello,

    This is an interesting approach, yet it yields an undesired alert on the Register page: “This content has been restricted to logged in users only. Please login to view this content.”.

    Is there a way I can include a class to the following code in order to stye the words You are already registered

    if ( ‘register’ == $mode && is_user_logged_in() && !
    $enable_loggedin_registration ) {
    ob_get_clean();
    return __( ‘You are already registered’, ‘ultimate-member’ );
    }

    Regards,

    Martin

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @legalmartin

    Unfortunately, there’s no filter hook to add the HTML tags. If you wish to modify the core files, we don’t fully recommend it as it will be overridden on plugin updates.

    This is an interesting approach, yet it yields an undesired alert on the Register page: “This content has been restricted to logged in users only. Please login to view this content.”.
    You are seeing it because you’re not logged-in. The “You are already registered” is only visible to logged-in users so i wonder why you’re seeing the content restriction message with the shortcode I’ve provided above.

    Regards,

    • This reply was modified 3 years, 3 months ago by Champ Camba.
    Thread Starter legalmartin

    (@legalmartin)

    Hello,

    I do not mind changing or updating the core files when UM releases an update.

    Can anybody provide the PHP code to amend the core files and get the desired solution?

    Regards,

    Martin

    PS. I cannot answer your question as to why I get this alert message when I am logged out.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @legalmartin

    Please try changing the following line:
    return __( ‘You are already registered’, ‘ultimate-member’ );

    with

    return __( ‘<div class="your-class">You are already registered</div>’, ‘ultimate-member’ );

    Regards,

    Thread Starter legalmartin

    (@legalmartin)

    Hello,

    Problem solved – thank you.

    Regards,

    Martin

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @legalmartin

    Thanks for letting us know. I’m marking this as resolved now.

    Regards,

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Give a class to “You are already registered”’ is closed to new replies.