Blog Details

redirect
by 
18 Jan/21

How To Redirect A Page to another page for desktop In WordPress Without A Plugin

Just add these code to function.php file

add_action(‘template_redirect’, ‘redirect_to_home_from_about_page’);

function redirect_to_home_from_about_page() {

if(( is_page(‘about’)) &&( !wp_is_mobile() ) ) {

wp_redirect(home_url());

exit();
}

}

 

 

 

Cart (0 items)
Proactive is a Digital Agency WordPress Theme for any agency, marketing agency, video, technology, creative agency.
380 St Kilda Road,
Melbourne, Australia
Call Us: (210) 123-451
(Sat - Thursday)
Monday - Friday
(10am - 05 pm)