Hi, to customize login / registration forms you would need to use some third party pugin, WPAdverts does not have any options to do that.
Can I just link to my standard login page?
like this one:
http://zooroom.org/login/
> where to change the code?
Thanks
You can replace default WP login URL with your own using code below
add_filter( "login_url", "my_login_url", 10, 2);
function my_login_url( $login_url, $redirect = null ) {
$login_url = "http://zooroom.org/annonces/creer/";
if ( !empty($redirect) ) {
$login_url = add_query_arg('redirect_to', urlencode($redirect), $login_url);
}
return $login_url;
}
Hello Greg
Thank you for you answer very much appreciated
But can you exlain in which file I should put this code?
And at what part of the file?
I’m really bad in code
Thanks a lot!
Hi, you should either put it in your theme functions.php file, or even better create a new plugin and paste it there.
Hello
Is there a way to put code in WP Adverts file and not in my theme files, otherwose I loss support from my template provider…
I just want to change this link “Se Connecter” target from
http://zooroom.org/wp-login.php?redirect_to=http%3A%2F%2Fzooroom.org%2Fannonces%2Fcreer%2F
> to : http://zooroom.org/login/
For this one: when I click on “Se connecter” > I end up on the same page.
> can I be forwarded into http://zooroom.org/login/
>>> I tried to change the link of your code from
function my_login_url( $login_url, $redirect = null ) {
$login_url = “http://zooroom.org/annonces/creer/”;
if ( !empty($redirect) ) {
$login_url = add_query_arg(‘redirect_to’, urlencode($redirect), $login_url);
}
return $login_url;
>>> into :
function my_login_url( $login_url, $redirect = null ) {
$login_url = “http://zooroom.org/login/”;
if ( !empty($redirect) ) {
$login_url = add_query_arg(‘redirect_to’, urlencode($redirect), $login_url);
}
return $login_url;
>>> when I do that the redirection is working into http://zooroom.org/login, but then I have issues when I try to login as admin (zooroom/wp-admin): see result in image at http://zooroom.org/loginTmp.jpg
>>>> any idea please
The login for from your screenshot is not a part of WPAdverts, i have no idea how to redirect it to selected page, you need to ask the form author how to do that.