I want to change the url of the WordPress ‘Back to XXXX’ on the wordpress url.
I’ve used this function to change the logo url, but there doesnt seem to be a footerurl reference.
add_filter( 'login_headerurl', 'custom_login_header_url' );
function custom_login_header_url($url) {
return 'http://www.myurl.com/';
}
Any ideas how I can change this url with a filter? My wordpress installation is a micro-site sitting under a main site, which is why I want it to go to a different url that home_url
.
3 Answers
Since this is not a standard feature you could achieve this
with your own css and js you could add to the page like this
<?php
function custom_login() {
echo '<link rel="stylesheet" type="text/css" href="'.get_bloginfo('template_directory').'/custom-login/custom-login.css" />';
echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>'
echo '<script type="text/javascript" src="'. get_bloginfo("template_url") . '/js/yourScript.js"></script>';
}
add_action('login_head', 'custom_login');
?>
change jquery url as wanted to get last version.
The div id where the link is in is called #backtoblog
you could change the innerhtml using javascript/jquery.
$('#backtoblog').html('<a href="http://gotomyblog.com">go back</a>');
or you could use css to get rid of it.
#backtoblog{display:none;}
like this.
enjoy