Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wp php redirect my account page url to custom url

function custom_redirect() {
    global $wp;

    if( $wp->request == 'my-account' ) {
        wp_redirect( site_url( 'my-account/orders/' ) );
        exit;
    }
}

add_action ('template_redirect', 'custom_redirect');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #wp #php #redirect #account #page #url #custom #url
ADD COMMENT
Topic
Name
6+6 =