Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress – Groups navigation / redirect to forum (this again)

  • Avatar of sdls
    sdls
    Member

    @simon_said

    If you’ve customized a BP site before, you’ll know that the groups nav bp_get_options_nav(); can be a real barrier in getting a site exactly the way you want it.

    There was an older solution to involving a permanent redirect (not ideal for SEM purposes) from home/ to forum/….

    `

    function redirect_to_forum() {
    global $bp;

    $path = clean_url( $_SERVER );

    $path = apply_filters( ‘bp_uri’, $path );

    if ( bp_is_group_home() && strpos( $path, $bp->bp_options_nav ) === false )
    bp_core_redirect( $path . $bp->bp_options_nav . ‘/’ );
    }
    add_action( ‘wp’, ‘redirect_to_forum’ );

    `

    and this one works in BP 1.5

    `

    function redirect_to_forum() {
    global $bp;

    $path = clean_url( $_SERVER );

    $path = apply_filters( ‘bp_uri’, $path );

    if ( bp_is_group_home() && strpos( $path, $bp->bp_options_nav ) === false )
    bp_core_redirect( $path . $bp->bp_options_nav . ‘forum/’ );
    }
    add_action( ‘bp_init’, ‘redirect_to_forum’ );
    `

    Is there no other way of moving functionality around in Buddypress Groups without creating explosions? It would be really nice just to be able to change the include file references in /groups/single/home.php to pull the functionality you wanted. For example…

    `

    elseif ( bp_group_is_visible() ) :
    locate_template( array( ‘groups/single/** change this to any file within /single/ **’ ), true );

    `

    If you change the home.php include file reference to forumn’s, the forum’s display just fine, however the add new topic functions and support do not seem to be dialed in… create a new topic and nothing happens… so in order to tap into forum functionality you actually need to be at the “forum” slug i.e. /forum/… is there any way of getting around this?

    To summarize… I’m trying to get the forum’s functionality working at the group root i.e. “sitename.com/groups/group-name/” WITHOUT a redirect to “sitename.com/groups/group-name/forumn/”

    Any thoughts? suggestions? similar experiences? Thanks!!!!

You must be logged in to reply to this topic.