1

I am using the OceanWP theme with the WP Job Manager plugin to build my job listing website.

When a user tries to 'Post a Job' when they are not logged in the WP Job Manager plugin shows a default login button which directs them to the default wp-login.php page: http://prntscr.com/pr86qn

But I wanted the user to be diverted to a new custom login/registration page I created as it does not have the 'Wordpress' logo on it and also allows users to register if they do not have an account.

When I clicked the "inspect element" option on this "sign in" button, I can see the link here: http://prntscr.com/pr8951

So I would like to change the link:

<a class="button" href="https://www.XXXXXXXXXX.co.uk/wp-login.php?redirect_to=https%3A%2F%2Fwww.XXXXXXXXXX.co.uk%2Fpost-a-job%2F">Sign in</a>

(I have XX'd out my website name as I would prefer it not to show in any google search results)

...so that it will direct the user to my new custom login/registration page instead.

Could anyone advise which file I could change this link from or if there is a better way of changing this link?

Thanks

Jas
  • 99
  • 1
  • 9

2 Answers2

0

Try LoginPress Plugin to customize default login Page https://wordpress.org/plugins/loginpress/

0

I think you need a more advanced function originally mentioned here

Add this to your function file.

function possibly_redirect(){
  global $pagenow;
  if( 'wp-login.php' == $pagenow ) {
    if ( isset( $_POST['wp-submit'] ) ||   // in case of LOGIN
      ( isset($_GET['action']) && $_GET['action']=='logout') ||   // in case of LOGOUT
      ( isset($_GET['checkemail']) && $_GET['checkemail']=='confirm') ||   // in case of LOST PASSWORD
      ( isset($_GET['checkemail']) && $_GET['checkemail']=='registered') ) return;    // in case of REGISTER
    else wp_redirect( home_url() ); // or wp_redirect(home_url('/login'));
    exit();
  }
}
add_action('init','possibly_redirect');

Please go through FTP