The MU forums have moved to WordPress.org

Fetching Blog Names from DB (7 posts)

  1. redsoxmaniac
    Member
    Posted 14 years ago #

    I am trying to fetch a list of blogs by blog name. I can only find the domain names, but not the blog names.

    How do I fetch the blog names from the DB? Where is it located? I know this is a stupid question but I am a newbie and still new to some of the wordpress php functions.

  2. redsoxmaniac
    Member
    Posted 14 years ago #

    For example:

    http://www.domain.com/blog1

    is called "the new blog"

    I have about 20 blogs, and needed to know how to fetch the names of all the blog names in the DB.

  3. cafespain
    Member
    Posted 14 years ago #

    It's in the options table:

    $name = get_blog_option($blog_id, 'blogname');
  4. redsoxmaniac
    Member
    Posted 14 years ago #

    Thanks a lot!

  5. andrea_r
    Moderator
    Posted 14 years ago #

    If you use the list all plugin, it has option to return to get the name(s) and return a list.

  6. redsoxmaniac
    Member
    Posted 14 years ago #

    I should've looked in the code. I was finding the fetch so I could put it in an autocompleter tool ( which I screwed up miserably ), but I will show you what I have in about two weeks.

  7. redsoxmaniac
    Member
    Posted 14 years ago #

    Thanks for the help guys. This really worked out good.

About this Topic

  • Started 14 years ago by redsoxmaniac
  • Latest reply from redsoxmaniac