Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Excluding certain blogs from bp_has_blogs() function for 1.2


r-a-y
Keymaster

@r-a-y

Here’s what I’m using in the interim.

Copy over /bp-default/blogs/blogs-loop.php to your child theme.

Modify the while line so it looks like:

<?php while ( bp_blogs() ) : bp_the_blog(); if(bp_get_blog_name() != "BLOG NAME YOU WANT TO EXCLUDE") : ?>

You’ll also have to modify the blog count and pagination count so it reflects the number of blogs.

You can do this by applying a filter to bp_get_total_blog_count. For the pagination count, you’ll need to duplicate the function and replace the existing one.

It’s not the best solution, but it gets the job done for now.

An “exclude” parameter, like you noted above, would be ideal.

Skip to toolbar