Support » Theme: MesoColumn » login and password filed

  • Resolved makling

    (@makling)


    Hi Richie,

    Is it possible to add/ separate out “login and password field + button” to the right most top-menu or floating if user visit the website via their mobile phone?

    my current “login, logout , register” was put into top menu with others, when mobile user visit my site, they need to click a moblie-nav menu icon and roll down to login page.

    many thanks ~~~

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author Richie KS

    (@rkcorp)

    add this to child functions.php or wp-content/meso-custom-functions.php

    <?php
    function meso_add_top_loginform() { if( !is_user_logged_in() ) {
    echo '<div id="mobile-login">'. wp_login_form('echo=0') . '</div>';
    } }
    add_action('bp_before_top_nav','meso_add_top_loginform');
    
    function meso_add_top_loginform_css() { if( !is_user_logged_in() ) {
    echo '<style>'; ?>
    @media only screen and (min-width:640px) {
    #mobile-login { display:none;}
    }
    #mobile-login {margin:1em 0;float:left;width:93%;padding:2%;background:#f7f7f7;border:1px solid #ccc;}
    #mobile-login p {float:left;display:inline;margin:0.6em 0.6em 0 0;}
    <?php echo '</style>';
    } }
    add_action('wp_head','meso_add_top_loginform_css');
    ?>
    Thread Starter makling

    (@makling)

    Thanks Richie,

    I don’t know why it just worked in function.php , I have tried to put into child functions.php and nothing happened. One more question is that I have a social login plugin installed, is it possible to integrate within the login password field, maybe left to the “login” button ?

    my current login page for example: http://hkbabycircle.com/wp-login.php

    Many thanks !!!!!!!!!!!

    Theme Author Richie KS

    (@rkcorp)

    One more question is that I have a social login plugin installed, is it possible to integrate within the login password field, maybe left to the “login” button ?

    seem like core edit needed…or the plugin edit need..no clue..need to ask plugin dev on this.

    Thread Starter makling

    (@makling)

    Hi Richie,

    I’ve found some information (Custom integration) related to the plugin , it state:

    If you want to add the widget to another location in your website, you can insert the following code in that location:

    <?php do_action( ‘wordpress_social_login’ ); ?>

    so, where should I put this code integrated?

    many thanks ~~~

    Theme Author Richie KS

    (@rkcorp)

    not sure, you’re looking to add social login in wp-login.php, that’s core related hook not theme. if its the theme login form, add the code in the previous code i mention above.

    function meso_add_top_loginform() { if( !is_user_logged_in() ) {
    echo '<div id="mobile-login">'. wp_login_form('echo=0');
    do_action( 'wordpress_social_login' );
    echo '</div>';
    } }
    add_action('bp_before_top_nav','meso_add_top_loginform');
    Thread Starter makling

    (@makling)

    YOU ARE SUPER, RICHIE !!!!!!!
    that’s really nice!!

    I have one more question, how to make “connect with X X <–social login icon” to next line not same line with login button ? ( in html is
    )

    many thanks & appreciated !!!!!

    maling

    Theme Author Richie KS

    (@rkcorp)

    i don’t think you can since login_form is wp functions, you can’t add filter inside it, only after.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘login and password filed’ is closed to new replies.