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 3 replies - 1 through 3 (of 3 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!

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