For the current site, you can use the $current_site
global variable and look at the blog_id member variable, e.g. $current_site->blog_id
Related Posts:
- How to set permalink structure via functions.php
- date_i18n() issue
- WordPress Multisite: Have the same header and footer of main-blog on all sub-blogs
- Display site admin profile fields in header.php
- How to test for MU via functions.php?
- Same footer on all multisites blogs
- Excluding a page with a certain name from wp_page_menu
- How can I disable/hide certain themes in multisite?
- Change the template of multiple multisite pages at the same time
- Is it a bad practice to use switch_to_blog in the frontend?
- Theme Development for WordPress Multisite Installation
- WordPress empty Nav Menu error
- multisite: global menu containing network site links?
- Acivate all themes multisite wide automatically
- Question regarding WP multisite feature
- Featured Image meta box not showing up
- Where do files uploaded via Media Manager get stored in MU?
- How to allow users to create their own website within my domain? [closed]
- Different text on different sites in a multisite setup
- How to make a theme unable to be used on a multisite network?
- Sample Theme Options page for Multisite – what to consider
- Get themes’s images path in WordPress Multisite
- Multi Site Setup, Child Themes, Getting Style Sheet Directory
- Converting a theme to a child theme in a network
- HTTP Error when uploading images over specific dimensions
- fetch all post from wp multisite network and sort all the post in descending order on the basis of “Created by ” term
- How to get full native language instead of iso?
- How to make menus, footer, sidebars multi language
- Why does the theme of secondary site load the primary one in WordPress Multisite? [closed]
- Let user publish posts on community page
- How to hide blog by id wordpress multisite listing
- Can I use WP Multi-site on a sub-domain with a different theme but use all the original site’s posts/pages?
- Mutlisite in wordpress is not working
- background_image support multiple image size?
- How can I demonstrate themes well?
- Theme Options Doesn’t Work On WP Multisite
- Subsite theme mystery man replacement with Buddypress on main site [closed]
- Custom link color or stylesheets
- Child Theme vs Duplicate Theme Renamed
- Is it possible to manipulate the list of page templates?
- default favicon for a theme?
- First wordpress blog, should I make my own theme for maximum customizability?
- How to determine which sidebar the widget has been added to, via widget admin?
- Plugging into the Media Library to upload images (NOT associated with any post)
- Help with “text domain”, comments_form in WordPress theme
- WooCommerce: VAT on grouped products
- Why is unfiltered html allowed in custom fields for author / contributor roles?
- Using the theme options to change background
- Getting the wrong page ID
- Avoid theme updates, just one theme
- How do I save a wordpress theme’s files and install them on another site?
- Custom WordPress install – activate custom theme
- Using AJAX in wordpress theme
- moving an admin submenu item to a top-level position
- Metadata Query when storing data as array possible?
- show a post from a specific post format
- How to use different assets if local or live
- get_option() returning empty
- How can I add a custom button to the post editor toolbar?
- Customizer: save setting/control content to post/page
- Wp_customize_image_control Use Add Media
- Changing Header Image Every N Minutes/Seconds
- Post Content Displaying Below ALL Shortcodes Content
- WordPress Template Part in iFrame
- Can I add an icon & function to the “Upload/Insert” toolbar at the top of the content editor?
- underscores use of the article element on the page template
- Ideal inline dynamic CSS injection
- How to create and populate with few links a menu in child theme functions.php?
- Plugin does not work in custom theme
- What’s the best way to create a new design for other pages?
- Consequences if using PHP include TEMPLATEPATH?
- Adding a gallery to my first theme
- Making custom woo themes
- Headless WordPress + Vue.js on the same server
- Previous and Next links not populating, have I missed something?
- not getting API setting saved confirmation message after update on option page
- Single.php the_excerpt loads same as the_content not loading read more line
- Is there a way to retrieve the calling template part?
- How to fix WordPress images not showing up in local hosted XAMPP server?
- WP_Query not getting all posts, just tagged posts
- how to hide home nav link in wordpress
- .current_page_ancestor broken in Twenty Eleven
- PHP Parse error: syntax error, unexpected ‘endwhile’ (T_ENDWHILE), expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) on line 124
- how use ajax to custom page template
- Removing element from DOM with jquery through plugin Custom Scripts for Customizer
- hide theme files for admin beneath root
- How to load jQuery with Ajax in WP version 5.3.2?
- Loop is breaking my theme. How can I fix?
- How do you remove the “Your Main Benefit Statement Goes Here.” From one of my pages?
- Recall translations made with Poedit
- How to achieve this navigation style in wordpress navigation
- WordPress Ajax Spitting out a page as a response?
- Postname permalink page not found error
- After theme change the menus have to be manually linked to the corresponding theme location
- What’s the policy for building a theme that doesn’t support widgets/menus?
- Passing a location-dependent array via wp_localize_script within a shortcode
- Global Navigation menu in diiferrent wordpress setups
- getting id of page
- How to make a sticky footer?
- How can i display a 4 diferent themplate for the archive page