How to get blog_id of an MU site when running a custom function on the parent site July 24, 2022 by Tarik Billa You need to use the global $current_blog instead. $GLOBALS[‘current_blog’]->blog_id will return the correct id.