The issue is with the Buddypress MPO (more privacy options) plugin installed only public blogs are shown in the Site Directory unless you are a superadmin.
Thank you to Ray for providing the following advice in the other thread:
BuddyPress only displays public sites in the Sites Directory for non-super admins:
I had to work around this for another site I work on to modify the
wb.public = 1clause.
I want to provide a little more detail on a complete fix and ask a couple of questions about the safety of this fix.
First, with the MPO plugin active there are five privacy level which are store in the wp_blogs table in the public column with a numerical index as follows:
1 Allow search engines to index this site
0 Discourage search engines from indexing this site
Note: Neither of these options blocks access to your site — it is up to search engines to honor your request.
-1 Visible only to registered users of this network
-2 Visible only to registered users of this site
-3 Visible only to administrators of this site
I wanted to display the top three options above for my users, and as per Ray’s advice modified the wb.public = 1 clause to wb.public >= -1
Question 1: are there privacy options out there with an index higher than 1 that will be captured by my >= operator?
Following the link above (which was a different version than I’m using) and then finding the corresponding spot in the function, I made this change. It worked perfectly, except…
The list tab “All Sites” was still displaying the old tab total. Clearly a similar change needed to be made elsewhere. The class-bp-blogs-blog.php uses the wb.public value in six different places. I’m not sure that I needed to modify all six, but it did solve the problem of the navigation bar total display.
Question 2: Is there any danger of messing something else up by changing all six, should I be more selective.
Question 3: I have been trying to confine my modifications to a child theme and this involves a hack of buddypress plugin files and the changes will need to be made with each BP update. Is there any “child themable” way to deal with this?
1. Not sure, but if you are not going to be using any other WordPress privacy plugins that is using the
'public' column, then you should be safe.
2. If you are modifying the
class-bp-blogs-blog.php file directly, then yes you could run into trouble later.
3. Look into using
wp-content/plugins/bp-custom.php instead of your theme’s
You must be logged in to reply to this topic.