Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8911297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:54:26+00:00 2026-06-15T03:54:26+00:00

I have tried the codes from here I have even tried this code <?php

  • 0

I have tried the codes from here

I have even tried this code

   <?php wp_login_form(); ?>

But if user enters a wrong username or password they get redirected to wp_login.php

Is there any login form which perform data in a page itself ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:54:28+00:00Added an answer on June 15, 2026 at 3:54 am

    +1 for a clear question

    Hello you can use this form

     < ?php
     /*
    Template Name: Custom WordPress Login
          */
      global $user_ID;
    
        if (!$user_ID) {
    
         if($_POST){
        //We shall SQL escape all inputs
          $username = $wpdb->escape($_REQUEST['username']);
         $password = $wpdb->escape($_REQUEST['password']);
        $remember = $wpdb->escape($_REQUEST['rememberme']);
    
        if($remember) $remember = "true";
           else $remember = "false";
      $login_data = array();
     $login_data['user_login'] = $username;
       $login_data['user_password'] = $password;
       $login_data['remember'] = $remember;
         $user_verify = wp_signon( $login_data, true ); 
    
        if ( is_wp_error($user_verify) ) 
         {
          echo "<span class="error">Invalid username or password. Please try again!</span>";
         exit();
       } else 
       {    
       echo "<script type="text/javascript">window.location='". get_bloginfo('url') ."'</script>";
       exit();
      }
    } else { 
    
      get_header();
    
      ?>
          <div id="container">
          <div id="content">
    
         <!--?php the_title(); ?-->
    
         <div id="result"></div> <!-- To hold validation results -->
         <form id="wp_login_form" action="" method="post">
    
         <label>Username</label><br>
         <input type="text" name="username" class="text" value=""><br>
            <label>Password</label><br>
           <input type="password" name="password" class="text" value=""> <br>
        <label>
        <input name="rememberme" type="checkbox" value="forever">Remember me</label>
             <br><br>
         <input type="submit" id="submitbtn" name="submit" value="Login">
    
          </form>
    
           <script type="text/javascript">                          
           $("#submitbtn").click(function() {
    
              $('#result').html('<img src="<?php bloginfo('template_url'); ?>/images/loader.gif"               class="loader" />').fadeIn();
         var input_data = $('#wp_login_form').serialize();
         $.ajax({
         type: "POST",
          url:  "<?php echo "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>",
         data: input_data,
          success: function(msg){
         $('.loader').remove();
        $('<div>').html(msg).appendTo('div#result').hide().fadeIn('slow');
        }
          });
          return false;
    
          });
        </script>
    
         </div>
          </div>
         <!--?php
    
        get_footer();
    }
         }
        else {
    echo "<script type='text/javascript'-->window.location='". get_bloginfo('url') ."'";
         }
          ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have tried this code to redirect a php page.but it s not working
I am trying to call c# function from javascript the code i have tried
i have this hap code of which tries to selects sub-node from the main
I have tried quite a few codes but none of them seem to work
I have tried using the code below but it only display results in Chrome
I have tried the following code but has no effect: Imports system.Runtime.InteropServices <DllImport(UxTheme.DLL, BestFitMapping:=False,
I have tried rectifying the code below. But I am not able to find
I have no idea why this isn't working. I've taken code from a previous
I haven't posted on here before but I have tried to do some research
Possible Duplicate: php warning mysql_fetch_assoc I have tried my code and it seems to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.