Skip to:
Content
Pages
Categories
Search
Top
Bottom

Allow participants to delete their own topics on forum


  • mrfreez1
    Participant

    @mrfreez1

    Hello !

    First, I apologize if my english is not good.

    I allowed participants to create their own topics but I don’t know how to give them the permission to delete their own topics and messages. I don’t want to trash their topics, I want to delete them permanently.

    Can you help me please ?

    Thanks !

Viewing 1 replies (of 1 total)

  • ripulkr
    Participant

    @ripulkr

    Assuming BBPress. You need to give your default user role the permission of deleting topics.

    bbPress User Roles and Capabilities

    something like :

    add_action(‘admin_init’,function(){
    // gets the author role
    $role = get_role( ‘subscriber’ );
    $role->add_cap( ‘delete_topics’ );

    });

    add it once in your plugin or theme then reload the wp admin screen page and then remove this cpde. Check if it has worked.

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