Skip to:

Need help updating a function for BP1.3

  • pcwriter


    The following function works well in functions.php for a BP1.2.7 theme I’m developing, but I need a bit of help updating it for BP1.3
    The function redirects users to “Group > Forums” as the “landing page” in groups instead of “Group > Home”.

    `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’ );`

    From what I’ve read on this page, slugs need to be changed, but I’m not sure how to do it.

    I’ve got trunk(3727) installed on a test site and most things are working well (aside from a few glitches with the adminbar and forums).

    Can anyone clue me in on how to update this function?

Viewing 3 replies - 1 through 3 (of 3 total)
  • It might work, but it’s a really ugly hack :)

    To sidestep answering your question, i’ll have a look sometime about a default groups page setting. Is there a ticket for this idea anywhere?




    Well, you answered this one:

    Have you thought of a different tack?

    That was to do with setting the members component default page in functions.php, nothing to do with a default page for a group. I was going to look at this then JJJ started his big refactoring, so I can’t do this until that work is finished and I’ve understood what the changes are.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need help updating a function for BP1.3’ is closed to new replies.
Skip to toolbar