Implementing Custom user login module in wordpress

I want to implement a custom login module inside wordpress. In the home page, I have this form where the users could register and another form where the users can login to the website.

Is it a better Idea to write custom code inside wordpress to accomplish my goal?

Read More

What other alternative do you suggest to it ?

Related posts

Leave a Reply

4 comments

  1. Nothing is wrong with writing custom code if you need something specific to happen when a user logs in. Other than writing custom code also is that you could just get an already built plugin!

  2. You can use this code to create a WordPress login form on any page.

    <div id="login">
    
    
    <form name="loginform" id="loginform" action="YOUR_WORDPRESS_FOLDER/wp-login.php" method="post">
    <label>Username:<input type="text" name="log" id="log" value="" size="20" tabindex="1"    /></label>
    
    <label>Password: <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="2" /></label>
    
    <label class="submit">
    
    <input type="submit" name="submit" id="submit" value="Login &raquo;" tabindex="3" />
    <input type="hidden" name="redirect_to" value="wp-admin/" />
    
    </form>
    
    </div>
    
  3. Writing custom code for WordPress is a very common thing. It almost what’s expected. Otherwise, you also have many themes and plugins where other people have written code you can use in your own WordPress site.

    WordPress also has a internal way to Register new users:
    WP memebeship

    If you enable this option under Settings > General, then your login page would have an option to register new users.

    Otherwise, if you want to write your own login code, you can start reading around the WP docs, for example in the internal function
    register_new_user.

    Unless you are creating something complex or special, you can stick to the built-in registration, and also customize with with HTML & CSS as you wish.