Skip to:
Content
Pages
Categories
Search
Top
Bottom

Only can reply admin user


  • luisannet
    Participant

    @luisannet

    Hi,

    I want that all users can create a new topic but only admin users can reply. How i can do that only admin user can reply?

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You would need to create a custom role, should be possible.

    Take a look at these to get you started:

    https://codex.bbpress.org/bbpress-user-roles-and-capabilities/

    Custom Capabilities


    luisannet
    Participant

    @luisannet

    Problem solved!

    Thanks for the help.

    Regards.


    tajender
    Participant

    @tajender

    @luisannet I am stuck with the same problem with my site. Could you please help me out?


    Robin W
    Moderator

    @robin-w

    Beyond @netweb’s links above, what help do you need?


    tajender
    Participant

    @tajender

    My problem is that I need that all users should be able to start a thread and only the user who started the thread and admin/moderator/keymaster should be able to reply. What permissions should I set on the user?


    Robin W
    Moderator

    @robin-w

    @tajender

    You’d need to modify

    wp-content/bbpress/templats/default/bbpress/form-reply.php

    create a directory on your theme called ‘bbpress’
    ie wp-content/%your-theme-name%/bbpress
    find
    wp-content/bbpress/templats/default/bbpress/form-reply.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/%your-theme-name%/bbpress/loop-single-reply.php
    bbPress will now use this template instead of the original

    you should really do this inside a child theme

    Functions files and child themes – explained !

    but if you do it in your main theme, keep a copy of what youb have done as updates are likely to overwrite

    The you would need to modify line 20

    <?php if ( bbp_current_user_can_access_create_reply_form() ) : ?>
    

    to put in a check to see if it’s current user

    It’s too near xmas, and I have too much else on to write and test the code but it will involve bbp_get_currect_user and the topic author $user_id

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