Skip to:
Content
Pages
Categories
Search
Top
Bottom

Editing /groups/create.php


  • gcrea
    Participant

    @gcrea

    I have copied create.php into my theme and am attempting to edit it. How do I set the default checked= to a private group status? No matter what I do public is always checked by default. This question extends to the other form fields as well. Also, where do I edit the action for create.php as I will need to add additional form fields? Thanks.

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

  • Venutius
    Moderator

    @venutius

    I don’t think overloading that file is the way to go for the default status change, you can set the default new group status using the bp_get_new_group_status filter, so you could do something like this:

    add_filter( 'bp_get_new_group_status', 'venutius_new_group_status_change' );
    
    function venutius_new_group_status_change( $status ) {
        return 'private';
    }

    gcrea
    Participant

    @gcrea

    Thanks so much! If you don’t suggest overloading create.php, what would be the best approach? Sorry, I’m new at this…


    Venutius
    Moderator

    @venutius

    I’ve just suggest it, above. To make the default group status private as you asked, you can add that to your bp-custom.php and it should do the trick for you.

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