Tutorial: Changing the account sign-in URL

Note: All code examples on this site are provided for developer reference/guidance only and we cannot guarantee that they will always work as expected. 

Our support policy does not include assistance with modifying or debugging code from any code examples, and they may be changed or removed if we find they no longer work due to changes in our plugins.

By default, the Sign In link on the Post a Job page takes users to the default WordPress sign-in URL, allowing them to sign in to your site before posting a job.

Screen Shot 2015-01-07 at 1.14.41 pm

However, you may want to change this to be a custom URL, like your site’s My Account page, for example.

To do so, add the following code to a plugin like Code Snippets):

add_filter( 'submit_job_form_login_url', 'wpjms_redirect_login_url' );
function wpjms_redirect_login_url() {
	return 'http://yourgroovydomain.com/my-account/';
}

Notice on line 3 where the URL is http://mysite.com/my-account/ – you can change this to whatever you’d like or use some custom PHP.

There is also a filter for the ‘log-out’ URL – submit_job_form_logout_url.

add_filter( 'submit_job_form_logout_url', function() {
  return wp_logout_url( 'https://yourgroovydomain.com/path/to/page' );
} );
Code Snippets Documentation