Wordpress loging form in a bootstrap modal

I want to load the wordpress login module in a bootstrap modal. I want to put the following code in the modal body and work as real wordpress login form from that modal. The modal will be created show up on click on a button/testlink

<form action="<?php wppb_curpageurl(); ?>" method="post" class="sign-in" name="loginForm">


        if ( isset( $_POST['user-name'] ) )

            $userName = esc_html( $_POST['user-name'] );


            $userName = '';

        if ( isset( $wppb_generalSettings['loginWith'] ) && ( $wppb_generalSettings['loginWith'] == 'email' ) )

            $loginWith = __( 'Email', 'profilebuilder' );


            $loginWith = __( 'Username', 'profilebuilder' );

        $loginFilterArray['loginUsername'] = '

            <p class="login-form-username">

                <label for="user-name">'. $loginWith .'</label>

                <input type="text" name="user-name" id="user-name" class="text-input" value="'.$userName.'" />

            </p><!-- .form-username -->';

        $loginFilterArray['loginUsername'] = apply_filters('wppb_login_username', $loginFilterArray['loginUsername'], $userName);

        echo $loginFilterArray['loginUsername'];

        $loginFilterArray['loginPassword'] = '

            <p class="login-form-password">

                <label for="password">'. __('Password', 'profilebuilder') .'</label>

                <input type="password" name="password" id="password" class="text-input" />

            </p><!-- .form-password -->';

        $loginFilterArray['loginPassword'] = apply_filters('wppb_login_password', $loginFilterArray['loginPassword']);

        echo $loginFilterArray['loginPassword'];


        <p class="login-form-submit">

            <?php $button_name = __('Log in', 'profilebuilder'); ?>

            <input type="submit" name="submit" class="submit button" value="<?php echo apply_filters('wppb_login_button_name1', $button_name); ?>" />


                $loginFilterArray['rememberMe'] = '

                    <input class="remember-me checkbox" name="remember-me" id="remember-me" type="checkbox" checked="checked" value="forever" />

                    <label for="remember-me">'. __('Remember me', 'profilebuilder').'</label>';

                $loginFilterArray['rememberMe'] = apply_filters('wppb_login_remember_me', $loginFilterArray['rememberMe']);

                echo $loginFilterArray['rememberMe'];


            <input type="hidden" name="action" value="log-in" />

            <input type="hidden" name="button" value="<?php echo apply_filters('wppb_login_button_name2', $submit); ?>" />

            <input type="hidden" name="formName" value="login" />

        </p><!-- .form-submit -->


            if ($display === true){


                $siteURL = apply_filters('wppb_pre_login_url_filter', $siteURL);

                $loginFilterArray['loginURL'] = '


                        <a href="'.$siteURL.'">'. __('Lost password?', 'profilebuilder').'</a>


                $loginFilterArray['loginURL'] = apply_filters('wppb_login_url', $loginFilterArray['loginURL'], $siteURL);

                echo $loginFilterArray['loginURL'];


        wp_nonce_field('verify_true_login','login_nonce_field'); ?>

    </form><!-- .sign-in -->


I found an answer.Its easy.


In modal body just put the function name in a php tag.

   <div class="modal-body">
     <?php wp_login_form(); ?>

Just copy and paste below code in your template or file

<?php if (!(current_user_can('level_0'))){ ?>
    <h2>Login Form</h2>
    <form action="<?php echo get_option('home'); ?>/wp-login.php" method="post">
    <input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="20" />
    <input type="password" name="pwd" id="pwd" size="20" />
    <input type="submit" name="submit" value="Send" class="button" />
    <label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label>
    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
    <a href="<?php echo home_url(); ?>/wp-login.php?action=lostpassword">Recover password</a>
    <?php } else { ?>
    <a href="<?php echo wp_logout_url(); ?>">logout</a><br />
    <a href="http://phprocks.letsnurture.com/">admin</a>
    <?php }?>

Need Your Help

Execute a job every N weeks between X and Y hour

triggers cron quartz-scheduler quartz.net

I am using Quartz.NET library and I need to execute a job every two days and repeat it every two hours between 22 PM and 6 AM. I don't know how to achieve this. I tried all of triggers combining them

How do I create a simple SOAP server using C# in Visual Studio 2010?

c# visual-studio-2010 soap

I was trying to follow the instructions here but they seem to quickly be getting very specific to Sharepoint, as they go along further. I just want a general tutorial for creating a non-sharepoint...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.