This will list all blogs except the current one and the main one:
$blogs = get_sites(
array(
'number' => 99999999,
'site__not_in' => array( get_current_blog_id(), 1 )
)
);
foreach( $blogs as $blog ) {
$addr = $blog->siteurl;
$name = $blog->blogname;
echo $addr . " - " . $name . "<br>";
}
Related Posts:
- Running WP Cron on multisite the right way
- How to check if image is already stored in a site’s post database? (network)
- Customize default settings on new sites on multisite
- Sorting list of sites from multisite network using wp_get_sites
- Integrating WordPress to my website, while keeping my own authentication system
- How does wordpress know which site to setup (on multisite)?
- Remove/unset options field from backend Settings->General?
- Multisite get_home_url(); – Getting URL for current site
- How to use wp_insert_user on WordPress Multisite?
- Network installation giving errors when viewing or adding a user
- Sort posts from multiple sites by date
- Fix 403 error on WordPress multisite network using subdomains
- How to create Sub Sub domain Multi User blogs?
- Why am I getting ERR_NAME_NOT_RESOLVED when I add a site to my multisite installation? [closed]
- Custom php page outside the scope of my theme
- WordPress (3.9.1) MultiSite Permissions. Is chown the answer?
- Adding hreflang tags automatically in WordPress subdirectory multisite
- How to add values to media “whitelist_options” in wp-admin/options.php template?
- How to change home or site url using action hooks or filter?
- wordpress media library new uploads don’t write to database
- WordPress returning 404 for multisite pages
- How to call plugin function per site in a multisite?
- WordPress returns “The link you followed has expired” error page whenever I add a new site, add a user etc
- NGINX rewrite rules for multisite
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)
- WP & Server Speed [Teacher Question]
- Moving code from theme header to functions.php
- Is it best to avoid using $wpdb for security issues?
- Count posts on multisite with blog id
- wp_redirect only works on main site and not on other sites
- How to avoid duplicates when creating recent network posts
- How do I display offsite database info on my wordpress site?
- Timthumb.php image gallery not working on Multisite WordPress
- Find Site ID From WP_Post
- List all blogs, but exclude the main site
- How to disable all logins except Network login in WordPress Multi site?
- Known Issues in WordPress When Upgrading PHP to ver 7
- WordPress homepage setup not working on first load
- Is it legal to redefine wp_password_change_notification in a mu plugin?
- Why, when moving a WordPress multisite network, have my theme customisations stopped working?
- Authentication from sub-folder non-wp cookie WordPress
- need help adding a new sidebar to a page that can’t use page-templates -> multisite
- How can I fix this code [duplicate]
- How to sort posts by active category in WordPress?
- wordprees multi-site in user panel add filter
- How to Redirect Buddypress Directories To Login Page For Non Logged in Users
- bp-custom.php is not working on a WordPress multisite environment. how to fix it?
- WordPress Multisite login_redirect to primary blog and specific page based on role
- How can I update WordPress plugins or WordPress itself in all server?
- Internal Server Errors – Moving working multi-site install to my localhost
- Merging Multiple WordPress Websites
- Annoying/confusing WordPress memory limit exhausted
- Create form which redirects to site in network?
- Redirect user role to a specific page on login in a multisite network?
- Multiple WordPress sites with different theme and plugin sharing the same content
- Changable favicon
- Remove node from multisites?
- PHP script to redirect traffic based on website accessed
- Add .php to end of all WordPress Pages (multisite)
- Adding users to another blog
- Transfer WordPress Login Session to an Extended Webpage on the Same Domain
- Resource 404 error on multisite subdirectory install
- Importing demo data in Multisite
- use system script advertising in wordpress multisite
- WP Admin Bar – Get current theme name as custom menu title
- WPMU schedule doesn’t execute actions
- WP multisite network plugin fails to see classes loaded with spl autoload
- Host does not allow remote connection, so how do I transfer data to my WordPress site?
- Trying to post information from a remote database to wordpress page
- Custom PHP-coding in MU installs
- .htaccess on multisite and roots theme?
- Force string into signup form
- I need a button to appear when not loged in and another when logged in, I need help fixing code PLEASE!
- WPMU – How to echo only one URL
- Losing Session ID and sessionStorage when navigating to other domains on Multisite
- add_rewrite_rule image from /images/site2/favicon.ico to /favico.ico
- Internal server error when enabling Multisite in WordPress
- How to create a build for quickly deploying a server with WP?
- NGINX rewrite rules for WordPress Subdirectory Multisite to support deep URL
- Single wordpress multi website down need help factoring what it is
- Enabling pretty permalinks with Docker, Multisite WordPress and Caddy
- Running WP-Cron on Multisite networks the right way?
- How to add query string at the end of sitemap Yoast SEO
- How to Customize the Admin Sidebar Menu in WordPress Multisite Network by changing the backend code of the wp-admin code files?
- Custom theme on multisite has issues with standard loop output
- Set custom post type to load custom block pattern by default
- Specified file failed upload test. wp_upload_handle
- Want to separate sections of posts. Can you restart loop?
- How do I create comment-reply-button using element not
- Removing WordPress profile fields from non-admins
- Issue with foreach on duplicate meta_key’s
- Show custom field if it exists, and show different elements if it doesn’t
- Cannot access wp-admin/wp-login.php (WordPress backend) anymore, what could be wrong?
- Passing UTM Parameters To Modify Page In WordPress
- Undefined offset: 3 in custom function
- Replacing WordPress Icons (menu,icons32, etc)?
- Flushing the slug base has no effect and does not change
- Assign meta_query value to php variable
- How to use url and amin-ajax.php
- Adding a variable to some PHP code with gettext