Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How can I hide category when create a new topic?

@pinkishhue

Participant

I’m assuming by category you mean the forum that the topic is in?

You can remove the forum dropdown menu and use a hidden field here instead.

In your theme you need to have this file:

wp-content/your-theme/bbpress/form-topic.php

If you don’t have it, copy it over from the bbpress default templates at:

wp-content/plugins/bbpress/templates/default/bbpress

Then open your new form-topic.php in a text editor and find this part of the code:

<p>
	<label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
	<?php
		bbp_dropdown( array(
		'show_none' => __( '(No Forum)', 'bbpress' ),
		'selected'  => bbp_get_form_topic_forum()
		) );
	?>
</p>

and replace it with this:

<input id="bbp_forum_id" type="hidden" name="bbp_forum_id" value="20">

Where 20 is the ID no. of the forum you want all topics to be created in.

Hope that helps 🙂

Skip to toolbar