Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to make only post author and moderators can reply


  • Danilo Borges
    Participant

    @danilo-borges

    Hi community!

    Is there any plugin that I can do this ? Allow only moderators or the topic author publish replies.

    A previous thank for any suggestion 🙂

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

  • MargaretGilliland
    Participant

    @margaretgilliland

    There are many different plugins available to efficiently manage WordPress multi-author blogs. You can get your needed plugin here http://goo.gl/W3VP.


    Robkk
    Moderator

    @robkk

    Download and put this file into your child theme in a folder called bbpress.

    I think this will not work for Anonymous Posting though.

    https://gist.github.com/robkk/737e2201c26ef262272b


    Danilo Borges
    Participant

    @danilo-borges

    Amazing Robkk! It is exactly what I was looking for!

    <?php if ( get_current_user_id() == bbp_get_topic_author_id() ) : ?>
    
    			<?php bbp_get_template_part( 'form', 'reply' ); ?>
    
    		<?php elseif ( current_user_can( 'moderate' ) ) : ?>
    
    			<?php bbp_get_template_part( 'form', 'reply' ); ?>
    
    		<?php else : ?>
    
    			<div class="bbp-template-notice">
    				<p><?php _e( 'You do not have permission to reply to this topic.', 'bbpress' ); ?></p>
    			</div>
    
    		<?php endif; ?>

    Thanks a lot!


    Nestin Vas
    Participant

    @nestinvas

    Hi,

    Is this file still available?

    Can you please tell me where I’m supposed to add the code?

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