There doesn’t seem to be an easy solution or plugin. But if you have some programming skills you may be able to do what you want : Custom bulk action
any body have solution for this for these years?
I’m wondering if there’s a way to do this now as well.
so move bulk topics from one forum to another – yes?
thanks, give me a day or 2 and I’ll see if that is easy to do
ok, so I’ve added this ability into my style pack plugin
bbp style pack
it is automatically there once you have activated the plugin, so just see SO TO BULK MOVE… below
OTHERWISE IF YOU PREFER TO USE CODE then
add_action( 'bulk_edit_custom_box', 'rew_quick_edit_fields', 10, 2 );
function rew_quick_edit_fields( $column_name, $post_type ) {
switch( $column_name ) {
case 'bsp_topic_forum': {
echo rew_bulk_edit_forums () ;
break;
}
case 'bbp_topic_forum': {
echo rew_bulk_edit_forums () ;
break;
}
}
}
function rew_bulk_edit_forums () {
// Start an output buffer
ob_start();
?>
<fieldset class="inline-edit-col-left">
<div class="inline-edit-col">
<p>
<label for="bbp_forum_id"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></label><br />
<?php
$no_forum_str =
/* translators: — is encoded long dash (-) */
esc_html__( '— No forum —', 'bbpress' );
bbp_dropdown( array(
'show_none' => $no_forum_str,
'selected' => bbp_get_form_topic_forum()
) );
?>
</p>
</div>
<?php
// Output the current buffer
$output = ob_get_clean();
return $output ;
}
add_action( 'save_post', 'rew_bulk_edit_save' );
function rew_bulk_edit_save( $post_id ){
// check bulk edit nonce
if ( ! wp_verify_nonce( $_REQUEST[ '_wpnonce' ], 'bulk-posts' ) ) {
return;
}
// update the forum
$forum_id = ! empty( $_REQUEST[ 'bbp_forum_id' ] ) ? absint( $_REQUEST[ 'bbp_forum_id' ] ) : 0;
remove_action( 'save_post', 'rew_bulk_edit_save' );
// update the post, which calls save_post again.
wp_update_post( array( 'ID' => $post_id, 'post_parent' => $forum_id ) );
// re-hook this function.
add_action( 'save_post', 'rew_bulk_edit_save' );
}
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
SO TO BULK MOVE…
go to dashboard>topics and use the tick boxes to the left of each topic to select the ones you want
then above the topics use the ‘bulk actions’ to select ‘edit’
and click ‘apply’ to the right of that
You will the see a dropdown box labelled ‘forum’ which lets you set which forum to change those topics to,
and click ‘update’
You *ROCK*, Robin!! Thank you so much. You continue to make using bbPress and bbStylePack easier and in such helpful ways!!
great – glad to have helped – it was an interesting challenge !