• Resolved Tom_A

    (@tauroyer)


    Hello

    A simple question.

    I just wanted to know if anyone knew how to edit the list of countries (alterable via the account section) ?

    I would like to replace it with names of regions 🙂

    In the hope ^^
    Thanks!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author gVectors Team

    (@gvectors-team)

    Hi @tauroyer,
    You should use wpForo user fields hook to change default values. This code replaces all countries to custom locations, you can add your locations. Just put it in your active theme functions.php file as it’s mentioned in this article.

    function custom_wpforo_user_locations( $user_fields ){
        if( isset($user_fields['location']['values']) ){
            $user_fields['location']['values'] =
                array(
                    //Custom Locations:
                    'custom location 1',
                    'custom location 2',
                    'custom location 3',
                    'custom location 4',
                    'custom location 5',
                );
        }
        return $user_fields;
    }
    add_filter('wpforo_member_after_init_fields', 'custom_wpforo_user_locations', 10);
    Thread Starter Tom_A

    (@tauroyer)

    Thank you very much @gvectors-team

    I’ll watch it all carefully: D

    Have a nice day !

    Thread Starter Tom_A

    (@tauroyer)

    That’s works ! Thank you very much 🙂

    Plugin Author gVectors Team

    (@gvectors-team)

    Glad I could help.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Change location list’ is closed to new replies.