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

login

Changing Login Logo

If you are using a child theme then maybe you should try the following code. Not necessary to put !important too unless some other plugin or code is overwriting it. function custom_loginlogo() { echo ‘<style type=”text/css”> h1 a { background-image: url(‘. get_stylesheet_directory_uri().’/images/login_logo.png); } </style>’; } add_action(‘login_head’, ‘custom_loginlogo’);

Categories login Tags login, logo

Is there a way to remove wp-login.php alias (login)?

This is the result of a default action, so you can remove it in a plugin with: remove_action( ‘template_redirect’, ‘wp_redirect_admin_locations’, 1000 ); You could also just block Python-urllib in your server configuration.

Categories login Tags login

Redirect to login page

If I understood correctly, you need to check if the user is logged in, if not, redirect it to login page. If the user logs in succesfully, he should be redirected to the page he was trying to see. You can do this by using the redirect argument of wp_login_url(). This code should work (not … Read more

Categories redirect Tags login, redirect, wp-redirect

How to place login logout link on menu that redirects users back to current page?

Use wp_login_url() function with get_permalink() as a parameter, if a user is not logged in. Something like this: <a href=”https://wordpress.stackexchange.com/questions/210374/<?php echo wp_login_url( get_permalink() ); ?>” title=”Login”>Login</a> And wp_logout_url function with get_permalink() as a parameter, if a user is logged in. <a href=”https://wordpress.stackexchange.com/questions/210374/<?php echo wp_logout_url( get_permalink() ); ?>”>Logout</a> EDIT: instead of using 2 different functions, you … Read more

Categories PHP Tags login, menus, php

send users logging in from wp-login.php directly to home page of site, rather than dashboard

You can achieve this by using the Plugin Peter’s Login Redirect. It allows you to send users to a specific page after login, based on the user capabilities. So you can allow administrators to go to the admin section, while members are redirected to the front page. If you want to prevent users from ever … Read more

Categories login Tags dashboard, login, wp-login-form

Save last login date in global before change it?

Don’t use global variables. You can do it like this without global variable: global $current_user; echo get_user_meta( $current_user->ID, ‘last-login’, true );

Categories login Tags globals, login

WordPress 4 invalid username special charachters issue

Are you creating your users via regular means or somehow importing them? Trying to create such user WP prevents me from doing so: ERROR: This username is invalid because it uses illegal characters. Please enter a valid username. The reason for that is that username is validated with validate_username(), which runs sanitize_user() in strict mode. … Read more

Categories PHP Tags htmlspecialchars-decode, login, php, wp-login-form

Redirect to requested page after (custom) login

Adding this snippet to the functions.php of your wordpress theme will redirect visitors to the page they were viewing after logging in. if ( (isset($_GET[‘action’]) && $_GET[‘action’] != ‘logout’) || (isset($_POST[‘login_location’]) && !empty($_POST[‘login_location’])) ) { function my_login_redirect() { $location = $_SERVER[‘HTTP_REFERER’]; wp_safe_redirect($location); exit(); } add_filter(‘login_redirect’, ‘my_login_redirect’, 10, 3); }

Categories customization Tags customization, login, redirect

Does WP show me if I’m logged in from multiple locations?

When WordPress logs you in, it creates a cookie on your system to keep you logged in if you want. However, being logged in from another location doesn’t have much meaning in this context. When you go back to your WP site, WordPress will check for the existence of this authentication cookie on your system. … Read more

Categories security Tags ip, login, security

Positioning the “Lost your password?” and “← Back to Site”

although I can play around with the CSS If you are not going to use CSS (or jQuery) to modify the position of these elements, you have to create your own login form: Customizing_the_Login_Form#Make_a_Custom_Login_Page. There is no hook in wp-login.php that allows to move these elements inside the form field. Related: Where to put my … Read more

Categories login Tags login, wp-login-form
Older posts
Newer posts
← Previous Page1 … Page140 Page141 Page142 … Page164 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
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 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