*

Jack

  • **
  • 14 posts
echo $current_country_code
« on: April 22, 2020, 05:39:13 PM »
Hi,

I tried in every way to print the country string in main page (eg: echo $current_country_code )

does anyone know how it can be done?

I tested:
echo osc_country();
echo $country['pk_c_code'];
$current_country_code = $country['pk_c_code'];

also $codecountry= str_replace('http://', '', osc_country_url());
 $codecountry = str_replace('.MYDomain', '', $codecountry); >>>>> no good

*

MB Themes

Re: echo $current_country_code
« Reply #1 on: April 22, 2020, 08:39:33 PM »
Country of what?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Jack

  • **
  • 14 posts
Re: echo $current_country_code
« Reply #2 on: April 22, 2020, 10:01:29 PM »
my site is www.domain.com (world)
fr.domain.com (france)
uk.domain.com (united kingdom)
...

I would like to know the "$ string" to be able to easily insert small variations for each country on the theme

thank you

*

MB Themes

Re: echo $current_country_code
« Reply #3 on: April 23, 2020, 07:19:58 AM »
@Jack
Ah, I have never tried subdomains, not quite sure if you can get it in that way. Simplest might be to define city/country of subdomain in config.php
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Jack

  • **
  • 14 posts
Re: echo $current_country_code
« Reply #4 on: April 23, 2020, 03:14:27 PM »
the subdomains are configured correctly and everything works.

What I can't do is get the string "country name" or "$country['pk_c_code']" on the main.php page..