multisite – List all sites created in network and get the language used for each site
Question
I have multisite enabled in WordPress network to build multi language blog and using the following code to list all blogs within my network.
<?php $blog_list = get_blog_list(0, 'all'); foreach ($blog_list as $blog) {
switch_to_blog( $blog['blog_id'] );
$url = get_option( 'siteurl' );
$name = get_option( 'blogname' );
echo $name . ':'. $url .'<br />';
restore_current_blog();
} ?>
Is there a way to get the language used on the blog from the code above?
0
4 weeks
2022-07-12T11:14:46-05:00
2022-07-12T11:14:46-05:00 0 Answers
0 views
0
Leave an answer