RE: hiding a site from the blog list in BuddyPress

Re: https://wpmudev.com/forums/topic/how-do-i-hide-a-site-from-the-blog-list-in-buddypress

Vinod Dalvi provided some code to bluekimberlite that hides blogs from lists in BuddyPress. The code also was instrumental in my issue however there was a very minor problem caused by the code …

I used the code to remove the 'main blog' (blog ID 1) from all the users' blog lists (as it was redundant) and the code did do that. Here is the minor problem, when you visit a user's page that show a list of the blogs they own it shows one extra count in the 'sites' tab.

Ex: If the user has no blog of their own it shows a count of 'Sites [1]' then in the list 'My Sites' it shows 'Sorry, there were no sites found.'

Or if the user has multiple blogs/sites …

Ex: If the user has 4 blogs of their own it shows a count of 'Sites [5]' then in the list 'My Sites' it shows 'Viewing site 1 to 4 (of 4 sites)' then showing a list of four blogs.

I hope that I was able to explain the problem clear enough, I will also attach an image to help.