Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group Forum with bbp private groups

  • @bbbt

    Participant

    Hi,

    We use bbpress, buddypress, and bbp-private-groups in a WordPress installation.
    Thank you for the great plugins!

    In the Buddypress Group Settings, the group administrator can also create a forum.
    How can I add a specific group from bbp-private-groups to a group forum when creating the group forum?
    I couldn’t find an option for this in the backend settings.
    Is there a suitable hook? I don’t know the forum ID yet for “groups_group_after_save”.
    I would add the group with add_post_meta( $forum_id, ‘_private_group’, ‘group1’, false );.

    Thanks for any tips!
    bbbt

Viewing 1 replies (of 1 total)
  • @robin-w

    Moderator

    I’m pretty sure that the buddypress function hooks to the new_forum_handler in bbpress, so this should work

    add_action( 'bbp_new_forum_post_extras', 'rew_add_pg', 10 , 1) ;
    
    function rew_add_pg ($forum_id ) {
    	 add_post_meta( $forum_id, '_private_group', 'group1', false );
    }

    Let me know of not.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar