Get Your WordPress Multisite Blog Slug

I chose this subject to write about for two reasons. One: I'm sure there are folks out there who will find this useful. And Two: I can never remember it myself so by writing about it here, I won't have to remember, I can just refer back to my own blog! Often, when using WordPress multisite as a content management system rather than a blog network, I have the need to use a blog slug in image paths, or when doing DB queries or whatever. There are lots of reasons, but here's how you get it > 1 I find the $GLOBALS variable to be really useful. If you'd like to see all the stuff you can get out of there, just drop this line in your theme somewhere (it's quite long, so best not to do it on a production site)- 1 Enjoy!

    • Marty has been an active search marketing professional for over 12 years. He has consulted with the Fortune 100 and Fortune 500 as well as medium to small B2B and B2c businesses, governments and higher ed.