Support » Networking WordPress » Get user site url

  • PLEASE! PLEASE HELP ME!
    I have been at this for 2 days without sleep and have tried everything I know.
    I am using multisite and I need to get the users siteurl in the comment template. I have been through the wpmu functions and this function is the closet I’ve gotten

    <?php
    $user_id = 1;
    $user_blogs = get_blogs_of_user( $user_id );
    echo 'User '.$user_id.'\'s blogs:<ul>';
    foreach ($user_blogs AS $user_blog) {
        echo '<li>'.$user_blog->blogname.'</li>';
    }
    echo '</ul>';
    ?>

    but i get this error
    Warning: Invalid argument supplied for foreach() in /home/jinijco/public_html/wp-content/themes/digizaar/comments.php on line 86

    This is my last effort before I give up on this.
    Any help is much appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Get user site url’ is closed to new replies.