Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Is there any way to let only topic owner to edit topic tags?

@robin-w

Moderator

ok, so

create a directory on your childtheme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpress

where %your-theme-name% is the name of your childtheme

find
wp-content/plugins/bbpress/templates/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/themes/%your-theme-name%/bbpress/form-reply.php
bbPress will now use this template instead of the original
and you can amend this

so amend this file – copy it to your Pc and use norepad or similar

around line 70 you will see

<?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) ) : ?>

replace this with

<?php
	$user_id = wp_get_current_user()->ID;
	$topic_id = bbp_get_topic_id() ;
	$topic_author = bbp_get_topic_author_id( $topic_id ) ;
	$is_topic_author = ($topic_author == $user_id ? true : false) ;
	if ( bbp_allow_topic_tags() && current_user_can('assign_topic_tags' ) && ($is_topic_author || bbp_is_user_keymaster() ) : ?>

This is untested, and if it doesn’t work – do come back !

Skip to toolbar