Find Jobs
Hire Freelancers

Skriv lite programvara

$10 USD

Closed
Posted almost 8 years ago

$10 USD

Paid on delivery
I have redirected my wp-login page to a custom page.([login to view URL]) When i login i want to be redirected to a custom page. ([login to view URL]) (Now I get redirected to the custom login page after login.) ([login to view URL]) Also I want to be redirected to home when logout. ([login to view URL]) I need help to write the php code in the [login to view URL] Everything is coded except when you login. This is the code I have so far. function custom_login_page() { $new_login_page_url = home_url( '/logga-in/' ); // new login page global $pagenow; if( $pagenow == "[login to view URL]" && $_SERVER['REQUEST_METHOD'] == 'GET') { wp_redirect($new_login_page_url); exit; } } if(!is_user_logged_in()){ add_action('init','custom_login_page'); } add_action('wp_logout','go_home'); function go_home(){ wp_redirect( home_url() ); exit(); }
Project ID: 10331835

About the project

4 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of SWEDEN
Saxtorp, Sweden
5.0
12
Payment method verified
Member since Jan 6, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.