Expertwebadvisor

  • Magento 2
  • PHP
  • WordPress
  • MySQL
  • SEO
  • Java Script
  • Others
  • Top 10’s

Display login form anywhere with wp_login_form In WordPress.

By Expertwebadvisor | Last Updated: May 7, 2013 | In: Wordpress


Suppose you want to display a login form to customize your wordpress themes, it is very simple and you can do it by adding wp_login_form() function to your custom theme. Just follow the steps given below and display the custom login form where you want.
Display login form anywhere with wp_login_form In WordPress.

Step 1. Just copy and Paste the below code where you want to display the login form

<?php
          wp_login_form();
?>

Or If you want to pass some other paramaetes then you can use the code:

<?php $args = array(
        'echo' => true,
        'redirect' => 'https://www.expertwebadvisor.com',
        'form_id' => 'loginform',
        'label_username' => __( 'Username' ),
        'label_password' => __( 'Password' ),
        'label_remember' => __( 'Remember Me' ),
        'label_log_in' => __( 'Log In' ),
        'id_username' => 'user_login',
        'id_password' => 'user_pass',
        'id_remember' => 'rememberme',
        'id_submit' => 'wp-submit',
        'remember' => true,
        'value_username' => NULL,
        'value_remember' => false );
wp_login_form($args);
?>

Now refresh the page and you will see the login form in your desirable location. Hope this helps. Thanks and enjoy the coding.

Tags:Login form in Wordpress,WordPress


Related Posts

  • Optimizing 404 Page Not Found In WordPress. Optimizing 404 Page Not Found In WordPress.
  • Disable notices and warnings In WordPress. Disable notices and warnings In WordPress.
  • Solution for the “Fatal Error: Allowed Memory Size” In WordPress. Solution for the “Fatal Error: Allowed Memory Size” In WordPress.
  • Set Custom Page Title In WordPress. Set Custom Page Title In WordPress.
  • Be Social, Share Us Here !!

  • Looking For Something !!

  • Popular Categories !!

    • Magento 2 Guide and Tutorials
    • Home Loan EMI Calculator
    • Car Loan EMI Calculator
    • Personal Loan EMI Calculator
    • Magento Guide & Tutorials
    • PHP Tutorials
    • WordPress Tutorials
    • SEO Tutorials
    • MySQL Guide
    • Opencart Tutorials
    • Linux/Ubuntu Guide
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Facebook
  • Twitter
  • DMCA.com Protection Status

Recent Posts

  • PHP array_​diff_​key Function
  • PHP array_​diff_​assoc Function
  • PHP array_​diff Function
  • PHP array_​count_​values Function
  • PHP array_​combine Function

Welcome to my Blog

Thanks for visiting my Blog, I have started this blog before 8 years ago and sharing my own experience, problem and solutions while working on the different type of projects. Enjoy the reading and don't forget to Facebook likes, Tweets or G+. You can also write me expertwebadvisor@gmail.com
© 2013 - 2025 Powered By
Top