How To Create Full Page Redirects Using The Plugin
-
Hi,
For certain pages I have where I just need a few components or text changing, them the shortcode works fine.For other pages I need completely different landing pages depending on the country.
So for example https://goproposal.com/pricing-uk or https://goproposal.com/pricing-usa
I found the code below in one of the other threads but wasn’t clear if that was for the entire site or whether it could be applied to specific pages too.
Cheers…
function country_geo_redirect() { $country = getenv('HTTP_GEOIP_COUNTRY_CODE'); if ( $country == "US" ) { wp_redirect( 'https://us.domain.com';, 301 ); exit; } else if ( $country == "GB" ) { wp_redirect( 'https://gb.domain.com';, 301 ); exit; } } add_action('init', country_geo_redirect');
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How To Create Full Page Redirects Using The Plugin’ is closed to new replies.