PHP code here to redirect based on Country. Country ID is 13

Get User Role and Country from database for country

basic premise:

if user role == “Dealer” and Dealer == approved {
if Canada %country_do13% then URL = Canada Price page

else US Price for all var fields = NonCan Price page}}

or error “please contact support”

Site Title:

Users profile page

URL Canada:

User field Canada:


Logout URL:

User Login:

user url Profile Page?:

ID below:

Site URL below:

Meta Key below:

Admin URL:

function my_permalink_redirect($permalink) {
global $post;
if ($post->ID == your_post_id_here) {
$permalink = ‘’;
return $permalink;