Exclude current blog ID from User blog list

Hi there!

I would like to list the user blogs excluding the current blog ID

In other words, I allow users to create sites from my main site, so they are user of this main site. I want to exclude this main site from the user blogs list.

This is the current code (it works)

$blogs = get_blogs_of_user($current_user->ID);

if ( !empty($blogs) ) { ?>

<p><?php _e( 'Sites you are already a member of:' ) ?></p>
<ul>
<?php foreach ( $blogs as $blog ) {
$home_url = get_home_url( $blog->userblog_id );
echo '<li><a href="' . esc_url( $home_url ) . '">' . $home_url . '</a></li>';
} ?>
</ul>
<?php }

Thank you :slight_smile:

Mark