I have a problem when user clicks on logout, he’s getting redirected to wordpress’s login page, whereas I want him to be redirected to website’s login page.
Here’s the header link I’m trying, but it’s not working :
header("Location:http://".$_SERVER['HTTP_HOST']."/ngo/wp-login.php?action=logout".
"&redirect_to=http://".$_SERVER['HTTP_HOST']."/ngo/?page_id=56");
get_header();
ngo/?page_id=56 is the permalink to the login page.
Try using the WP function for that purpose. The parameter is the URL to redirect to on logout. :