@ Mark & or Marie continued – How do I remove countries from any theme?

  • Liz
    Elite Member 441 points
    March 22, 2015 at 11:25 pm

    Hi Mark & or Marie

    Marie was kind enough to answer my question by saying change the Php file.

    So I asked a developer to do it for me, as I messed it by deleting the wrong thing.
    After this ….. Mark was kind enough to update my DA website for me from V8 to V 8.1

    So Now all the countries came back again !! 🙂

    Are you able to explain exactly what I delete in the php framework file to remove countries? I feel terrible asking people to do it for me, I would much prefer to learn to do it myself. are you able to help me?

    I just want the country selection to be a small selection of English speaking countries.
    Examples UK, USA, NZ, Australia, and Also Mark told me to use the DB key STATE1 because the key called STATE, would not work after deleting countries, so would I need to change this DB key back to State 1 again? Although the DB key STATE may not have been working relating to the V8 theme, and maybe noting to do with deleting unwanted countries in the php file.

    Thanks Liz

    maybe a couple more when I think of them!

  • Mark Fail
    Mark Fail
    Super Guru 13,013 points
    March 23, 2015 at 4:29 am

    file: framework/class/class_search.php

    there is an array of countries at the beginning of the files;

    $GLOBALS[‘core_country_list’] = array(‘AF’ => ‘Afghanistan’,..

    simply remove the values from the array you dont want.

    This reply was awarded the best answer by the topic poster.
  • Liz
    Elite Member 441 points
    March 23, 2015 at 8:14 am

    Thank you Mark, Which bit is the array?

    The actual word afghanistan = country,
    The AF between the inverted commas,
    Or the whole line including the comma and the two full stops at the end?

    Remember Designer not php coder ! LOL to me array means the whole line, is this right?

  • Mark Fail
    Mark Fail
    Super Guru 13,013 points
    March 23, 2015 at 8:40 am

    like this;

    1 => 1,
    2 => 2,
    3 => 3

    if you wanted to remove 2, then it would look like this

    1 => 1,
    3 => 3

  • Liz
    Elite Member 441 points
    March 23, 2015 at 8:54 am

    Got it done it :)) Woooo Hooo If I win the lottery, I’m taking your whole family shopping in the Bahamas! LOL

    Do I do the same for States or leave that alone ?

  • Pascal
    Newbie 17 points
    April 9, 2015 at 11:58 am

    Hi Mark,
    How to fill a state?


  • Younoussa
    Newbie 3 points
    April 15, 2015 at 1:01 am

    Hi Mark Fail and Liz,

    I feel i have a similar problem. I need user during registration to use pre-populated country, island,state,City, Street..

    How do i start from class_search


  • Josh
    Super Guru 13,875 points
    April 15, 2015 at 2:06 pm

    @Younoussa you can only do this for country and state
    @Pascal to fill state go to the state array and find your country abbreviation for example if your country is Albania your abbreviation is AL so you can replace/remove/add the states already there

Viewing 8 posts - 1 through 8 (of 8 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes