Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

wp-login-form

Redirect away from login page

The login_init hook is the first one to be called in wp-login.php, so try hooking into it instead. function redirect_invalid_login() { global $error; if( $error ) { wp_redirect( get_bloginfo( ‘url’ ) . ‘/client-login/?message=6’ ); die(); } } add_action( ‘login_init’, ‘redirect_invalid_login’ ); If that doesn’t work, please provide more details.

Categories redirect Tags redirect, wp-login-form

Change ‘Back To Website’ link in wp-login.php

You can achieve that using Javascript and login_footer action hook to change the href attribute of the Back to link: <?php add_action(‘login_footer’, ‘ad_login_footer’); function ad_login_footer() { $ref = wp_get_referer(); if ($ref) : ?> <script type=”text/javascript”> jQuery(document).ready(function($){ $(“p#backtoblog a”).attr(“href”, ‘<?php echo esc_js($ref); ?>’); }); </script> <?php endif; } ?> Edit: Thanks to @brasofilo answer, you might … Read more

Categories redirect Tags redirect, wp-login-form

How do you add a custom link to the wordpress login page?

Well, you can add link after lost your password, but I don’t think you can add link before lost your password link unless you design your own login page. function hook_lost_your_password ( $text ) { if ($text == ‘Lost your password?’){ $text .= ‘<br /><a href=”http://codebing.com”>Visit Code Bing</a>’; } return $text; } add_filter( ‘gettext’, ‘hook_lost_your_password’ … Read more

Categories wp-login-form Tags wp-login-form

Why can’t /wp-login.php be load balanced?

A few things to check on: Review wp_salt. Make sure all of the web servers are running on the same set of salts in the wp-config.php file. Ideally, these should be mirrored from a single location. Review is_ssl() and make sure this function is properly detecting SSL across all of your web servers. I’ve seen … Read more

Categories performance Tags nginx, performance, wp-login-form

How to auto login after registration? [duplicate]

Have you tried this? function auto_login_new_user( $user_id ) { wp_set_current_user($user_id); wp_set_auth_cookie($user_id); wp_redirect( home_url() ); // You can change home_url() to the specific URL,such as “wp_redirect( ‘http://www.wpcoke.com’ )”; exit(); } add_action( ‘user_register’, ‘auto_login_new_user’ ); Taken from this SO answer: WordPress auto login after registration not working

Categories redirect Tags redirect, user-registration, wp-login-form, wp-redirect

FORCE_SSL_ADMIN not working

Just figured it out… It was the positioning of the define statement. I added the below above the /* That’s all, stop editing! Happy blogging. */ line define(‘FORCE_SSL_ADMIN’, true); define(‘FORCE_SSL_LOGIN’, true); Thanks!

Categories wp-admin Tags security, ssl, wp-admin, wp-login-form

Custom Login and Registration form in Ajax

Here is a simple shortcode that gets the job done: add_shortcode(‘ajax_login’,’ajaxlogin_shortcode_handler’); function ajaxlogin_shortcode_handler($atts,$content=null){ if (is_user_logged_in()) return; $retval=”<p id=”message” style=”color:red”></p>” .wp_login_form(array(‘form_id’ => ‘ajaxloginform’,’echo’ => false)). ‘<div id=”login-result” style=”position:absolute; top:300px; left: 670px;”> <img src=”https://wordpress.stackexchange.com/questions/78193/path/ajax-loader.gif”/> </div>’; $js = <<<JS <script type=”text/javascript”> jQuery(document).ready(function($){ $(“#ajaxloginform”).click(function() { // turn loading screen on $(‘#login-result’).toggle(); //get foem data var input_data = $(‘#my-login-form’).serialize(); //make … Read more

Categories customization Tags ajax, customization, login, wp-login-form

Can’t access wp-admin

Let’s try this, Open up your wp-login.php file and add the following update_option calls, update_option(‘siteurl’, ‘http://your.domain.name/the/path’ ); update_option(‘home’, ‘http://your.domain.name/the/path’ ); beneath, require( dirname(__FILE__) . ‘/wp-load.php’ ); so… it should look like, require( dirname(__FILE__) . ‘/wp-load.php’ ); update_option(‘siteurl’, ‘http://www.example.com/’ ); update_option(‘home’, ‘http://www.example.com/’ ); Where http://www.example.com/ should match your domain. Then visit your login page. Then remove … Read more

Categories wp-login-form Tags wp-login-form

WordPress login with Phone Number [closed]

WordPress “login” process assumes that a user name is given. If there is no user name, there is nothing to authenticate and most likely your code is not being reached at all. If you want to have your own form, just write your own authentication. The other path you can follow is to change the … Read more

Categories plugins Tags login, plugins, wp-login-form

Attach to wp-login.php and xmlrpc.php

Additionally to using htaccess, you can disable the XML-RPC function by adding the following to your child theme’s functions.php: # Set XML-RPC features to false add_filter( ‘xmlrpc_enabled’, ‘__return_false’ ); add_filter( ‘pre_option_enable_xmlrpc’, ‘__return_zero’ );

Categories htaccess Tags .htaccess, hacks, security, wp-login-form, xml-rpc
Older posts
Newer posts
← Previous Page1 … Page27 Page28 Page29 … Page34 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress