Search
 
SCRIPT & CODE EXAMPLE
 

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');
Comment

PREVIOUS NEXT
Code Example
Php :: select query in php 
Php :: symfony datetime now 
Php :: get slogan wp 
Php :: phpspreadsheet read xlsx 
Php :: time php 
Php :: twig is in string 
Php :: laravel migration index 
Php :: csv file to associative array php 
Php :: show random post in laravel 
Php :: continue not in the loop or switch 
Php :: create char laravel migration 
Php :: laravel update by id 
Php :: laravel sum relationship column 
Php :: Composer Fatal error: Call to undefined function SymfonyPolyfillMbstringiconv() in phar 
Php :: php cloudflare get country from IP 
Php :: php fix array index 
Php :: how to echo only certain character number in php 
Php :: php previous page 
Php :: how to prompt user for input in php 
Php :: change password function in laravel 
Php :: current time input field in laravel form 
Php :: PHP File Read Modes 
Php :: curl in php 
Php :: offset codeigniter 3 
Php :: duplicate record laravel 
Php :: foreach in php 
Php :: redirect compact laravel 
Php :: php json_encode utf8 
Php :: drop all tables laravel 
Php :: print only some characters of a string in php 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =