multisite site list by country

Multisite sites (shops) list by country and city

I would like to sort sites by country and city.
How is it possible?

Thanks.
Paddy

  • Rupok

    Hi Paddy

    I hope you had a wonderful day.

    I'm not quite sure what are you exactly trying to achieve. Do you want to show a list of all the subsites in a page in the parent website and sort them by city or country or both?

    So for listing all the subsites, you can use the following php code:

    <?php
    $blog_list = get_blog_list( 0, 'all' );
    foreach ($blog_list AS $blog) {
    echo '<a href="'.$blog['domain'].$blog['path'].'">'.$blog['blog_id'].'</a><br>';
    }
    ?>

    It will list and link them. Please let me know how you are planning to sort them. Do you want to display it like this, but with a category header with Country/City name? I believe I can help as soon as I get your idea clearly.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Paddy

    I hope you had a wonderful day.

    I'm not quite sure what are you exactly trying to achieve. Do you want to show a list of all the subsites in a page in the parent website and sort them by city or country or both?

    So for listing all the subsites, you can use the following php code:

    <?php
    $blog_list = get_blog_list( 0, 'all' );
    foreach ($blog_list AS $blog) {
    echo '<a href="'.$blog['domain'].$blog['path'].'">'.$blog['blog_id'].'</a><br>';
    }
    ?>

    It will list and link them. Please let me know how you are planning to sort them. Do you want to display it like this, but with a category header with Country/City name? I believe I can help as soon as I get your idea clearly.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Paddy

    I hope you had a wonderful day.

    I'm afraid you can't list your stores according to the base country from plugin options. You can still do that but it will require complex custom coding which is beyond our support scope.

    However, you can hire developers from our Jobs section located here: https://premium.wpmudev.org/jobs/

    Please note, developers available in our jobs section, are not the developers at WPMU DEV. So we can't take responsibilities of their work. Please consult with properly them before you hire anyone.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.