Use the constant BLOG_ID_CURRENT_SITE
. And to get the database table prefix, use;
$main_blog_prefix = $wpdb->get_blog_prefix(BLOG_ID_CURRENT_SITE);
Related Posts:
- ‘Global’ settings page for multisite plugin
- Making my plugin multi-site compatible
- Plugin Development: WPMU or WP?
- Auto Load Plugin Hooks inside Must Use Plugin
- How Is Network Activate Different From Activate (by Implementation)?
- Inherit plugin settings to new site in Multisite
- How to install plugins in individual sites on a wordpress network?
- How to Check If A Plugin Is Enabled Through API?
- Fatal error: Call to undefined function wp_get_current_user()
- How to tell if plugin has been network activated
- How does WordPress Multisite know that a Plugin is installed?
- How to enable Admins to see Plugins
- Network-Wide Plugin Settings Management
- Is there a way to share content amongst wordpress sites
- How to install WordPress Multisite with different domains under the same subdirectory?
- Multisite: Activate plugin for subsites only?
- Error Message from W3 Total Cache when .htaccess Rules Cannot Be Modified? [closed]
- Get list of sites that uses specific plugin or theme
- Setting up a multilingual wordpress site
- How to get popular post from across a network?
- How to make sexy bookmarks plugin work in WPMU
- How to setup a Network Plugin across the network with only my settings?
- WordPress language switcher
- Multisite Backup Plugin [closed]
- Automatically adding post and pages to new blog setups
- Multisite Widget/Content
- get_option compatible with wordpress network (multisite)?
- Is it possible to set up multistore in Woocommerce? [closed]
- Cannot access wp-admin after disabling all plugin
- WordPress Multisite – get_plugin_data()
- Error 404 using wpml plugin
- How to define WordPress plugin shortcode globally for multisite?
- Convert existing WordPress Site (with several plugins) into Multisite
- Disable multisite-wide plugins on specific sites
- WordPress Multisite plugin delegation
- How do I tell what plugins are used on my multisite install?
- Multisite custom user activation emails – html
- Multiple sites, multiple countries
- NGiNX + PHP5-fpm + CDN Tools (plugin) [closed]
- Show function to super admin
- Generate pages from markdown files in github automatically
- Install (enable) plugins on multisite, on localhost
- How can I copy all users to newly created site on a multisite network in WordPress?
- WordPress wp-admin/network/plugin-install
- Create a multisite network for an existing installation
- “Micro-Site” Options
- Configuring Propel to Work with Multisite
- Multiple domains issue
- Users are being redirected to main site when trying to register on subsite of my Multisite network
- “Master” WordPress Multisite – Database Sync
- User Signup in Multisite – Need Plugin or Advice
- Certain functions are undefined when called form mu-plugins
- Multisite for Multisite?
- Why shortcode always displayed after footer not in body
- Understanding State in WordPress Multisites
- One sub site is slow while all others load fine, same theme & plugins [closed]
- How to display terms and conditions in post area?
- How to check wp_options’s rewrite_rules if current and existing are the same before flush the rules?
- How to integrate together a website currently hosted WordPress.com and a custom web application currently hosted on Azure?
- How do I get the Payzone WooCommerce payment gateway plugin to show up in the settings? [closed]
- Managing wordpress Themes & plugins for multisite
- WordPress’s is_plugin_active_for_network function not working for multisites
- Cannot add edit themes and add plugins after multisite update
- Each User has a Personal Blog
- Storing Form data in a different database
- Completely remove ability to create users?
- how to make a wplang for network fill automatically
- looking for a multi-user hello-world plugin
- Plugin to create unlimited custom shortcodes?
- After enable multisite enviroment in wordpress site creation wizard not working
- Bulk User Deletion
- Best method of implementing compartmentalized custom post types on a multi-site network
- In a WPMU that uses several different domains, how to enable users to register subdomains of any domain from the main site?
- In Multisite Setups, how to update mass sections of sub-sites
- WP Forms not displaying,becomming an fatal error
- disable plugin activation on no multisite
- How to Fix WordPress multisite woocommerce 403 file error
- How to capture hidden values with Gravity Forms
- How to use get_blogs_of_user?
- Multisite converted to Single Site can’t add new plugins or new themes
- Install/Enable/Activate plugin on multisite without access to master site
- Category as Subdomain for One WP Install
- Renamed plugin folder and when I changed back nothing was activated
- How To Add Code To WP Without Plugin or Functions
- How to Call Function From Separate WordPress Install on Same Server?
- Specific plugin script not working on subdomain
- Coming soon pages with rest of site in maintenance mode
- Query Shortcode from a multisite to appear on a different site?
- How to enable Admins to see Plugins
- Multiple Accounts on 1 email – Multisite
- Show image or notification on specific blog in multisite
- Force Network Activated Plugin to Run After Site Level Plugins
- Custom plugin breaks css.php on Multisite
- Check if user is in a group of another site within multisite network [closed]
- WordPress multisite haml templates
- Trying to output a “Most visited blogs” list in wordpress multisite
- Managing database tables in WordPress multisite
- Add custom fields in the new and edit the site forms without touching the WP core
- why i cannot see some plugins while they are enabled on network admin page?
- Change email notification language based on the site language in WPForms