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 Explode a Textarea Field and Echo each line separately, wrapped with HTML
- do not show web page section when using advanced custom fields pro
- How to slow down server response
- Get all user meta by meta key instead of ID
- how can i show only the parents in owl-carousel?
- Use menu link or onClick to set a variable
- Create highly customized submenu (possibly using wp_list_pages)
- Why doesn’t add_filter have the option to include a callback for each run?
- Sending a custom form data in email through WP Mail Function
- Force Users To Relogin
- Compare current post Category in select menu
- Get quantity of children in all parents and add quanity to all UL class names
- How to display already created menus via php?
- Test the existence of a page/article by its URL, taking in consideration the URL rewriting by filters
- how to add new PHP page in WordPress plugin
- Pagination 404 error(I have refreshed the permalinks and tried several previous options)
- Input field duplicates on form submit by jQuery
- Is it possible to dupplicate a WordPress post with php?
- if user is admin display admin link and logout link else display logout only
- Using variables as href in anchor tags (PHP) [closed]
- Parse error: syntax error, unexpected ‘else’ (T_ELSE) [closed]
- Code working in functions.php but not pluign for gavity forms
- PHP – Multiple variables in insert post array