Skip to:
Content
Pages
Categories
Search
Top
Bottom

Redirecting group directory link to group forum page


  • ericreynolds007
    Participant

    @ericreynolds007

    When a visitor is on my Groups Directory page, and he or she clicks on a group hyperlink from the group list, I would like the visitor to go to the group’s forum page, rather than the group’s activity page. I found the following code in my groups-loops.php directory, `

    <a href="”>

    `

    I believe that I have to change `bp_group_permalink()` to something else to direct a visitor to a group’s forum page. Can anyone give me that path?

    Thanks in advance,

    Eric

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

  • Virtuali
    Participant

    @gunju2221

    Maybe a little easier solution is to add a link to the group’s forum next to the name:

    Add this to bp-custom.php

    `function my_group_loop_forum_link() {

    if ( !bp_group_is_forum_enabled() )
    return;

    if ( !bp_group_is_visible() )
    return;

    echo ‘Forum ?‘;

    }
    add_action( ‘bp_directory_groups_actions’, ‘my_group_loop_forum_link’ );
    `


    ericreynolds007
    Participant

    @ericreynolds007

    Thank you SVC. I ended up replacing `bp_group_permalink()` with `bp_group_forum_permalink()` and everything works fine.

    :) Eric

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirecting group directory link to group forum page’ is closed to new replies.
Skip to toolbar