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

How to redirect after login getting a variable from url (for example with the language)

I ended up encoding the redirect url. using php in my case (‘http://example.com/wp-login.php?redirect_to=’.urlencode(http://example.com/specificpage/?parameter1=dog&parameter2=dog&parameter3=cat));) Now it works!

Categories redirect Tags language, login, redirect, urls

reset password link redirect to login page

I just found the answer: www.example.com/wp-login.php?redirect_to=url?action=rp&key=XXXXX&login=XXX contains the fragment ?redirect_to=url. Some plugin you have installed seems to add this using wp_login_url(‘url’);, which results in an incorrect formatting of the url. Used with wp_login_url() your problems should be fixed.

Categories login Tags login, password, wp-login-form

How to redirect login and register pages

You could try to add this to your .htaccess file: Redirect 301 http://domain.com/wp-login.php http://domain.com/profile/login Redirect 301 http://domain.com/wp-login.php?action=register http://domain.com/profile/register Hope it helps.

Categories pages Tags login, pages, user-registration

Private page protected with username and password

So here’s what we’re trying to do: IF A user logs in and is of a specific role ( Subscriber ) then redirect them to a specific page. IF A user tries to reach the admin panel, redirect them to a specific page. We’re going to use 3 hooks for the above problems: login_redirect – … Read more

Categories login Tags login, password, private, user-roles, username

Can’t login unless twentyfifteen theme is active

Because the problem is theme specific, I guessed that perhaps something in functions.php could be the culprit. I renamed the file to some random string and this resolved the problem. I then experimented by commenting out sections of functions.phpand discovered that wp_reset_password(…) caused the problem. I needed it only once anyway, so I removed it … Read more

Categories theme-development Tags bug, login, theme-development

How can I prevent my custom form from redirecting to wp-login?

This has been covered quite thoroughly here: https://wordpress.stackexchange.com/a/105224/62906 I’ve linked directly to the most informative and complete answer of the group (IMO).

Categories login Tags login, wp-login-form

Why a strange discrepency between get_current_user_id() when using AJAX versus output of document.cookie?

I had to trace through WordPress core and the REST API plugin code to fix this, but finally did it. The solution is described here. The TL;DR of the solution is that the WP-API will ignore the content of the login cookie and assume an unauthenticated (logged out) request unless the correct value is given … Read more

Categories ajax Tags ajax, cookies, login, wp-admin, wp-api

Verify if user is wordpress logged in from another app since wordpress 4.0

Ok i’ve found the solution. In fact, as i haven’t noticed, there is always the hashed mdp, but for now, the logged_in cookie is structured like this : %login%|%timeout%|%sessionId%|%passhached% instead of : %login%|%timeout%|%passhached% This is like this since wordpress 4.0, and the wp_session_cookie integration, the auth method is the same that before but there is … Read more

Categories plugin-development Tags login, plugin-development, security

External Authentication, session_tokens not destroyed on logout

Here is the final code to get sessions to write to the usermeta and delete on logout. This code works with WordPress 4.5.2. The code is for user_id information only. add_action( ‘after_setup_theme’, ‘new_login’ ); function new_login() { $user_id = ”; // Change your code to grab user_id from external source if ( $user_id > 0 … Read more

Categories plugin-development Tags hooks, login, plugin-development, session

Is there a better way than checking user is logged in to show or hide adminbar?

There’s actually a show_admin_bar hook where you can always return true or false. I haven’t run across an issue where the admin bar is randomly disappearing though. Usually on my websites I like to turn it off for admins: /** * Remove Admin Bar For Administrators * Or anyone who can activate plugins */ function … Read more

Categories login Tags admin-bar, login
Older posts
Newer posts
← Previous Page1 … Page114 Page115 Page116 … 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