Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a Wordpress multisite with different child sites for different geographical locations. At the root url, I want to show an index page with links to the child sites. 1. How do I automatically populate links to the child sites? 2. How do I automatically populate site descriptions for the child sites? 3. How do I create a Google map with markers representing the child sites, assuming the locations of the child sites are entered in the site descriptions?

share|improve this question
add comment

1 Answer

For create the links to your child sites use this

    function elenco_sotto_siti(){
global $wpdb;
$blogs = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->blogs  WHERE public='1' AND archived='0' AND mature='0' AND spam='0' AND deleted='0' ORDER BY blog_id "),ARRAY_A );  
    return $blogs;

    }

For question 2 and 3, i use the option framework plugin, and i grab the description and other setting with

    switch_to_blog($site->blog_id);
$immagine= of_get_option('example_uploader');
    restore_current_blog();

If you create an option fot the address and grab it into your main site you can create the map The option framework plugin is at this URL http://wptheming.com/options-framework-plugin/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.