Skip to:
Content
Pages
Categories
Search
Top
Bottom

Removing BuddyPress menus, just showing Scholarpress menus


  • paintscape
    Member

    @paintscape

    I am using the default BP theme (as Child theme). I would like to clean up the whole look, but don’t know what I can and cannot remove. For example, right now there are two menu rows one for the courseware and one for buddypress. In this case, we are only interested in the Scholarpress menus for our courses. Can we simplify and have just the courseware menus show up? It seams redundant and confusing to users. Where would I do that? Also, what about changing ‘my groups’ to something more fitting like ‘my courses’?

Viewing 12 replies - 1 through 12 (of 12 total)

  • noizeburger
    Participant

    @noizeburger

    Just take a look a the codex: https://codex.buddypress.org/home/

    To hide the bp-adminbar (on top of the page), take a look on this page: https://codex.buddypress.org/extending-buddypress/changing-internal-configuration-settings/
    You just add this line to your wp-config.php (or, if you have, bp-custom.php): `define ( ‘BP_DISABLE_ADMIN_BAR’, true );`

    To change labels: scroll down to the bottom on this page: https://codex.buddypress.org/extending-buddypress/customizing-labels-messages-and-urls/


    paintscape
    Member

    @paintscape

    Thanks for your reply,
    I have looked at the codex. That is helpful, especially for changing labels. But I guess my question has more to do with the specific default theme and how it works with Scholarpress. It is like the theme menus are duplicated (not the admin-bar). Unlike WordPress editing, BuddyPress seems complicated. I was hoping someone would know what files need to be edited in the theme to make the changes I would like to make to the menu structure…


    Stas Su?cov
    Participant

    @sushkov

    @paintscape, I think that can be done using a plugin.
    I can try some code to achieve that.
    Brb.


    Stas Su?cov
    Participant

    @sushkov

    Sorry, had to fix my laptop these days, so it took some time :)
    Try this code:
    `
    <?php
    /*
    Plugin Name: Hides group menus that are not related to Courseware
    Author: stas
    */

    function hide_group_menus(){
    global $bp;
    // Check if Courseware is enabled
    if( !defined( ‘BPSP_VERSION’ ) )
    return;

    if( !bp_group_is_admin() ) {
    // hide main ‘noisy’ menus
    $bp->bp_options_nav = $bp->bp_options_nav->courseware;

    if( $bp->current_component == $bp->groups->slug && $bp->current_action != $bp->courseware->slug )
    // go directly to Courseware tab
    bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . $bp->courseware->slug );
    }
    }

    add_action( ‘wp’, ‘hide_group_menus’ );

    ?>
    `
    The result should look like this:
    https://i.imgur.com/JPa40.png

    Basically it overwrites the group menus with Courseware ones. Only if the visitor is not a group admin (only for students)!


    paintscape
    Member

    @paintscape

    This is great, thanks!
    Now a stupid question, where do I put the code? ;)
    Do I create a new plugin or edit one?


    paintscape
    Member

    @paintscape

    BTW, I took the advise on changing labels, “groups” now say “articles”.
    ;)


    Stas Su?cov
    Participant

    @sushkov

    yes, paste this into a new file in your `wp-content/plugins` and check the `wp-admin` to enable it.


    Stas Su?cov
    Participant

    @sushkov

    about changing labels, that will require exact phrase and it’s location… you can’t just change one word. I also have to make sure it can be changed dynamically.

    Stas — great plugin and thanks for all of your work developing it. We’re testing it now and we’ve tried to implement this plugin to hide group menus but it doesn’t seem to be working. We’re thinking it’s because the BP core has since changed with the release of 1.5. What do you think? Should this code still work as-is? Thanks!


    Stas Su?cov
    Participant

    @sushkov

    It might depend on the theme you are using.
    Could you report back the name of it.

    We are currently testing courseware with the “Frisco” theme. This is not likely to be our final theme when we go live, however, so it sounds like we should switch sooner rather than later. We are considering the Genesis Framework specifically because they seem to offer the best Buddypress solution through their “genesisconnect” plugin.


    Stas Su?cov
    Participant

    @sushkov

    I will take a look at Frisco, since its open source and nicely done.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Removing BuddyPress menus, just showing Scholarpress menus’ is closed to new replies.
Skip to toolbar