Skip to:

get rid of create a group button

  • where is this piece of code located? i would like to get rid of the button so that users wont be able to create groups. i tried to use a plugin that did it but it caused problem with posting topics in the forums.

    Also, should i create my own theme so that i can change these files…like when i take out the code for the button? right now i am just using default which is working fine.

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

  • modemlooper


    in your theme folder /groups/index.php

    find the <h3> at top replace with

    <?php _e( 'Groups Directory', 'buddypress' ) ?>
    <?php if ( current_user_can( 'delete_others_posts' ) ) : //only admins and editors can see this ?> &nbsp;
    <a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_GROUPS_SLUG . '/create/' ?>">
    <?php _e( 'Create a Group', 'buddypress' ) ?></a><?php endif; ?>

    This will show the button for only admins. You can still create groups if you go to the url.

    OK cool, thanks. I doubt they would go to the url but i will keep that in mind.

    did you use this plugin?

    if so and that caused an error – can you drop me a message with what happened so I can fix it? thanks!

    yea im fairly certain the error was from your plugin but not 100%…at least thats the only thing i believe it could have been since it was the only plugin i had or tried to install. i am using WP and BP latest versions. and i am using the default BP theme. I had no mods or plugins installed except that one.

    it worked fine doing what it was supposed to be doing not letting users create a group…however i couldnt create a topic in my forums. i would try to and i would get an error saying something like: ‘There was an error creating this topic’ in a red box. I tried as the admin and a user with the same result. deactivating it did not help so i reinstalled WP and BP and now my forums work and i can create topics.

    did you have the ability to create new topics in whatever group forum prior to the plugin install? maybe a fluke due to the deactivate issue – since i’m not touching anything on the forum side.

    I’ll take a look and see if there is anything else though.

    i actually didnt try. i only tried to create the topic after i installed the plugin. i was using the internal version of bbpress in BP. I can do a test to see if it happens again, i can back up my stuff, install and see what happens. would you like me to?

    if you have some downtime, that would be great. :)

    reinstalled it and it was working. so im assuming your plugin was working. however, i hadnt done any modifications at all to BP so im not sure why i was getting the error. it could have been that i hadnt posted to the forums yet maybe.

    thanks for verifying! at least this thread reminded me to include css removal of the ‘Create a Group’ button on the group directory page :)

    just an fyi for those wishing to do this, when a user goes to to post a topic, if they havent joined a group yet they are prompted to join or create one. So to get rid of this message, go into BP folder, forums folder, index.php file. in that file, just delete the part of the text that asks the user to create a group.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘get rid of create a group button’ is closed to new replies.
Skip to toolbar