0

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?

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
Orangeman555
  • 1,179
  • 2
  • 21
  • 45
  • FYI, WPMU is Wordpress Multi-User, not Multisite. WPMU is no longer under development as Multisite features were introduced into core in 3.0. _"Has this been implemented yet?"_ isn't really a valid question; the plugin isn't under development any more, so if the feature you desire isn't implemented, it never will be. – Christian May 07 '14 at 05:50
  • This is interesting - so when I'm researching multi-site I should simply search "multi-site" or is there a different keyword used for it? This is indeed under development, correct? Multi-site? – Orangeman555 May 07 '14 at 05:53
  • Actually after a bit of searching it appears that some of the docs still refer to it as WPMU, which is inconsistent on Wordpress' behalf. But yeah Wordpress Multisite is what you'd want to search. Have you tried the suggestion on the last post of this thread? http://wordpress.org/support/topic/get-blog-path-with-wordpress-30-multisite – Christian May 07 '14 at 06:01
  • I'll add my solution - let me know if it's bullet-proof or will give trouble...this will be a distributed package. – Orangeman555 May 07 '14 at 06:04

1 Answers1

0

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));
Orangeman555
  • 1,179
  • 2
  • 21
  • 45