Skip to:
Content
Pages
Categories
Search
Top
Bottom

Only can reply admin user

  • @luisannet

    Participant

    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)
  • @netweb

    Keymaster

    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

    Problem solved!

    Thanks for the help.

    Regards.

    @tajender

    Participant

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

    @robin-w

    Moderator

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

    @tajender

    Participant

    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

    @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