How Add Custom Redirection for Specific WP Page

How Add Custom Redirection for Specific WP Page

/**
 * Custom Redirection Function for /online-keuzehulp/.
 */
function redirect_online_keuzehulp() {
    if( is_page( 13024 ) && count($_GET) ){
        $mylink = $_SERVER['REQUEST_URI'];
        $mylink = str_replace( '/online-keuzehulp/', '/assortiment/', $mylink );
        $url = home_url().$mylink;
        wp_safe_redirect( $url );
    }
}
add_action('wp_head', 'redirect_online_keuzehulp');
wprocket

 

GenesisPro728x90

Facebook
Twitter
LinkedIn
Pinterest
Tumblr
Anwer Ashif

Anwer Ashif

Founder of RainaStudio. Help businesses and individuals to create and outstand their online presence. Our success rate is measurable. Our blog served all around the world and counting.

Leave a Reply

Your email address will not be published. Required fields are marked *