I am using a function that redirects the user to a custom page, rather than wp-login in the event of errors. In my case I am using the Http Referer function to send the user back to the same page because I have the login form in a modal. How can I execute a function on the redirected page, so that the page automatically opens the modal? This is the code for the redirect in the event of an error: …
when a new user registers an activation link is sent to his e-mail account. I want the user to enter his username, email address and password and straight register and be logged in without confirmation (confirmation does not prevent spam bots from signing up for the site, I don't care about it really!) is there a way to do it?
I've my login box on any page of my WordPress and I'm trying to redirect to the same page after a user logs in. For example: If I make the login in the URL http://localhost/wordpress/category/sub-category/sold, redirect to the same URL. I've this in my functions.php but, using my $url doesn't work. How can make the redirection? function login_go_home(){ //$url ="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; wp_redirect(home_url()); exit(); }
We are building a landing page site (only 2 pages total) for a client where they are physically mailing out access codes to specific customers. Therefore, I am trying to create a login system where ideally, a user logs in with a pre-determined access code. I have been trying different hacks of a login type of but nothing is working to create a single-step, simple process. The "verification" system that this site uses is close to what I'm looking for, …
When new site is created on my multisite installation, I automatically add the new user to the main site (because I need him to order the product): add_user_to_blog( 1, $user_id, 'customer' ); I'd like to have the users automatically login them to all their sites, as soon as they login to one of the sites they belong to. I hoped to hook to the wp_login action and just set the auth_cookie for each sites the user belongs to, something along …
On my private page, I want the website to be shown only to logedin people. So if a person comes to the site, the first is displayed custom template login form. When the person log-in, the home page is displayed. I have this redirect done with the following code: add_action( 'template_redirect', function() { if ( ! is_user_logged_in() && ! is_page( array( 'prijava', 'pozabljeno-geslo' ) ) ) { wp_redirect( esc_url( home_url( '/prijava/' ) ) ); exit; } }); And the log …
I'm fairly new to Wordpress, so please bear with me on this. I've been having issues logging into my Wordpress admin panel on a second computer. I originally set up WP on my work computer and all works fine there. However, I tried to log in with my personal computer and was denied. After logging into WP successfully (blue side panel), I navigated to the WP Admin link at the bottom. When I click it, it takes me to a …
I'm looking for a way to always display the current site logo (as set in customiser) on the wp-admin page in place of the WP logo via CSS. I know how to manually add a custom image (code below is part of the function I use): #login h1 a, .login h1 a { background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo.png); background-size: contain; But I would like to make the entire URL dynamic, so the site logo can be changed in the customiser …
I want to use another link for logout because I have /wp-admin/* protected with htpassword. Is there a way to do this? Something like creating a custom page like site.com/logout then use it as my new logout link? Thanks!
So I want to apply a theme and style the lost password page without the use of a plugin. I don't want it to show the default Wordpress lost password page. I managed to style the login form by redirecting the URL to the styled version, but I'm lost as to how I can style the lost password page. Any ideas? Thanks!
After searching for a couple of days and reading 2 year old threads I'm having difficulty finding a solution to the problem of having users login by email only. At first I was delighted to see WP_Email_Login only to find out you can still use your username to login. I'm not sure how to go about writing this as a plugin. My idea is to override the register_new_user function. I didn't see this on the "pluggable" functions list. Can I …
I am working on a site and sometimes I run into an error when logging out and on the site tab it says 'Wordpress Failure Notice'. I am trying to remove all instances of wordpress so users dont know Im using it, but I can not figure out how to remove the text from the tab. I dont have no code to try and show because Im not even sure where to start. The text shows up on the wp-login.php …
How can you leverage wp_set_auth_cookie to programmatically login a user on a specific blog in a multisite environment? wp_set_auth_cookie doesn't allow you to set the target blog to authenticate the user under. I have a multisite/buddypress setup where activations happen on the primary domain. I want to then automatically authenticate that user not for the main site, but for one his site that was created on registration.
I'm trying to make a customized registration page in front end, but when I try to reload the page in error/success case it display that message in chrome: Confirm Form Resubmission The page that you're looking for used information that you entered. Returning to that page might cause any action you took to be repeated. Do you want to continue? my code : the_post();//Iterate the post index in the loop. get_header(); $err = ''; $success = ''; global $wpdb, $PasswordHash, …
I changed the admin URL from /wp-admin like this: rename wp-login.php to mylogin.php replace all occurrences of wp-login.php with mylogin.php Now I can login via /mylogin.php. The default page can be accessed without the extension at /wp-admin rather than /wp-admin.php. How can I do the same so I can login via /mylogin instead of /mylogin.php? (I'd like to do this without a plugin.)
This seems odd to me because if you're signing on a user you shouldn't already be signed in... therefore your permissions shouldn't matter. It may be a bit of an odd way of going about it, so that could be causing the issue. Here's the code: function login( $user_name, $password ) { $creds = array(); $creds['user_login'] = $user_name; $creds['user_password'] = $password; $creds['remember'] = false; $user = wp_signon( $creds, true ); if( is_wp_error( $user ) ) { $result = $user; } …
I have a case where I have an ACF variable that is stored within a users profile and based on that variables state I need to redirect to one of two pages once the user logs in. This is just a true or false value that will represent if a user has logged in before. I have tried using wp_redirect to do this and it does sort of work but seems to run excruciatingly slow and sometimes will briefly get …
wp-login.php?redirect_to=https problem Please forgive me if I am posting in the wrong place but I am here to see if you can help me with some minutes of your time. The problem is a website showing persistent internal errors all around the wp-login.php. I am able to login and access the front end with no difficulties. I have tried to debug but the errors do not show up o any pages. I have tested the theme, the plugins, etc etc …