Place Social Login buttons and text above Login/Register

Our users seem to have trouble with the social login concept. We get users not realizing they can register with the Social Login, or trying to use their Facebook/Google username/password on the local login form.

We'd like to present the Social Login buttons above the Login/Register forms on our My Account page, panning the width of the page. Right now the Social Login buttons only appear after the form in the Login block.

Would you be able to offer any direction on how to go about this?

https://craftsbytwo.com/my-account/

Best Answer

  • Figured it out. For those who might have the same interest, added the following to functions.php in my child theme.

    /** https://docs.woocommerce.com/document/add-a-message-above-the-login-register-form/ */
    
    add_action( 'woocommerce_before_customer_login_form', 'jk_login_message' );
    function jk_login_message() {
        if ( get_option( 'woocommerce_enable_myaccount_registration' ) == 'yes' ) {
            ?>
            <h1>Social Login</h1>
            <div class="woocommerce-info">
                    <p><?php _e( 'Quickly connect with your Facebook or Google account. No need to remember another username and password!');
                    do_action('oa_social_login');
                    ?></p>
            </div>  
            <?php
            }
    }
    

Answers

  • Claude_SchlesserClaude_SchlesserAdministratorOneAll Team

    Thank you for the instructions ;) I'm glad to hear that you have found a solution!

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.