How do I "hack" buddy press to not show my main site's blog

Hiya hkcharlie

My apologies. I somehow removed this topic and was unable to restore it! I've copied and pasted your post here and will get ya a response up next!

Again, sincerest apologies!

-Mason

-------------------- Original Post ---------------------------

I am using the bp-social theme.

On my WPMU site I can setup blogs to my hearts content that are all listed in the blog directory.
But the actual root blog doesn't show, if I click on the root blog I just get linked to the home page of my buddypress/wpmu bp-social theme install.

I now understand that this is how buddypress works (https://premium.wpmudev.org/forums/topic/my-root-blog-doesnt-work)

So my question is now, how can I either remove that blog from the blog list or remove the blog list all together.

  • Mason
    • DEV MAN’s Sidekick

    Right. So, let's see if we can get this sorted. :smiley:

    how can I either remove that blog from the blog list or remove the blog list all together.

    The listing of the root blog along with all others is core to BuddyPress.
    I've just tested this as an alternative and it works on my install:

    1st you'll need to grab our awesome Blogs Directory plugin:
    https://premium.wpmudev.org/project/blogs-directory

    Just unzip the file, open it and look at the "config" setting on line 32. It defaults to using the "blogs" slug which is the same as BuddyPress. Change it to something else. Anything you like - blogz, blogs2, just not "blog".

    Now, save your changes and upload the file. In WordPress create a new page. You can name it Blogs or Directory or again, whatever you like, just make sure the page slug matches what you entered in the step above.

    You'll now have a new menu item listing all blogs (except your main site). Pretty neat!

    Now, we still need to get rid of the "Blogs" dropdown created by BuddyPress in our theme. To do this we need to head over to navigation.php in our bp_social folder and open it up.

    Comment out or remove lines 102 - 118. I'm gonna paste the exact section to remove below:
    <?php if ( function_exists( 'bp_core_is_multisite') ) : ?>
    <?php if ( function_exists( 'bp_blogs_install' ) && bp_core_is_multisite() ) : ?>
    <li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
    <?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Blogs', 'bp-social' ) ?>"><?php _e( 'Blogs', 'bp-social' ) ?>

    <?php endif; ?>
    <?php else: ?>
    <?php if ( function_exists( 'bp_blogs_install') ) : ?>
    <li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
    <?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Blogs', 'bp-social' ) ?>"><?php _e( 'Blogs', 'bp-social' ) ?>

    <?php endif; ?>
    <?php endif; ?>

    Now, you no longer have the "Blogs" sub menu in BP Social and you have a new menu item which displays all Blogs except the main site!

    Hope this is a help!

  • dubya
    • The Incredible Code Injector

    So, marking a blog as having a particular rating shouldn't affect the googlebots at all? I bet it may even help if I were no longer linking to myself so much.

    Ahhh... the clouds are parting, and I can hear angels singing! Is that a golden shaft of light shining down on drmike?

    Cheers!

  • drmike
    • DEV MAN’s Mascot

    So, marking a blog as having a particular rating shouldn't affect the googlebots at all?

    Directly? No.

    It will keep the blogs out of suck things as the sitewide tags plugin, either the one from here or Donncha's. All the List All Blogs plugins. Stuff like that. Those provide SEO benefit via their links to the blog of course. But the Mature marked blog is still reachable by the bots. There's no noindex or anything like that.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.