Skip to content

Instantly share code, notes, and snippets.

@hivepress
Last active July 26, 2023 17:23
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Redirect the user login form to a custom URL (note that this breaks some user flows) #hivepress #users
<?php
add_filter(
'hivepress/v1/forms/user_login',
function( $form ) {
if ( ! isset( $form['redirect'] ) ) {
$form['redirect'] = 'custom URL here';
}
return $form;
},
1000
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment