wpmu Get Blog Address? ie /myblog/

I can't seem to find a convenient WPMU (Wordpress Multisite) function for getting the blog's path.

For instance if it is www.example.com/myblogpath/ I'm simply looking to get myblogpath.

Has this been implemented yet?


To get the path, I simply did a find-replace on some globals ...

define('ss_blog_path', str_replace(array($current_site->path, '/'), array('', ''), $current_blog->path));
Tags: PHP / Wordpress / Path

Similar questions

How to get current site id? (WPMU)
I am using WordPress with MU activated. I found a function here that supposed to return an object with the current side ID. But it's returning 1 for all websites.
Ajax requests with different WordPress Address and Site Address setup
I have a user using my plugin with the following wp setup I am using admin_url( 'admin-ajax.php' ) to pull the ajax url, which returns When doing ajax requests from a page on http://www.somewebsite.com, it looks like the "same origin policy" is in effect and the requests fail. Any suggestions on how to fix this issue?
how to set from address according to the form input email address for wp_mail()?
I am trying to create form and send it to my e-mail address using wp_mail. my wp_mail() code is: and for changing the from address I've added the following filters into my functions.php and the form HTML is: It's not sending the mail form to my email. but It sends form to my email if I change the filters as following: So how can make it possible to...
Site Address and WordPress Address settings when using a load balancer
I am installing my wordpress forum in two identical servers: I would like to have both of these servers sit behind a load balancer: LB (public dns: lb.com) When filling in the Site Address and WordPress Address settings in wp-admin->settings, which address would I fill for each server? I would like to use each instance's respective address for t...
Unable to load WordPress local site after changing WordPress Address (URL) and Site Address (URL)
I have setup WordPress in my local machine and worked fine. I have accidentally changed WordPress Address (URL) and Site Address (URL). Now I am unable to access the local site. How can I fix this issue? Thank you in advance.
Must I change the admin user email address while changing the general email address?
I changed the email at Settings > General from [email protected] to [email protected] It seems like the email didn't change, although I received the confirmation email to change. I'm still receiving emails from [email protected] Do I still need to change the Administrator email under Users to [email protected] for the change to take effect? Using WP 5.1.3

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.