The MU forums have moved to WordPress.org

How to fetch blog path from db? (3 posts)

  1. joehuffman2
    Member
    Posted 12 years ago #

    I am trying to make a function on my sidebar where the blog path is echoed in all the themes in my WPMU. I have looked at some of the functions ( get_blog_options, get_current_site ), but there doesn't seem to be a straightforward way of getting the blog path.

    Is there a function that is around that will allow me to fetch the blog path of a current subdirectory blog?

  2. skcsknathan001
    Member
    Posted 12 years ago #

    you have to construct

    global $current_site;

    $bpath = 'http://' . $current_site->domain . $current_site->path;

    echo $bpath;

    I don't know above will work for sub directory, but it is the way for sub domain installations.

  3. joehuffman2
    Member
    Posted 12 years ago #

    Could I just use for the variable $current_site->path? I am using a subdirectory format.

    I will check this out. Thx!

About this Topic

  • Started 12 years ago by joehuffman2
  • Latest reply from joehuffman2