Can I get any help on this forum at all?
Hi,
Did you try asking the developer of that plugin?
You can post on their support page here:https://wordpress.org/support/plugin/bbpress-post-topics/, other users of that plugin might be able to help if you post on there.
Thanks for getting back. I’ll do as you have suggested. Just that the dev. has abandoned the plugin for years now.
They may have quit working on it.
I did some digging through their code, and came up with something for you to try if you want.
You’ll add the below code to your theme’s functions.php
file, once you add the code and save the file. Reload your WordPress admin area by refreshing the page/browser, then remove the code and re-save the file.
Go to your discussions page, and try out that button(Apply settings to existing posts) again and see if it works for you.
if(!function_exists('bbppt_reset_topics_for_posts_meta_fix')){
function bbppt_reset_topics_for_posts_meta_fix(){
$args = array(
'meta_key' => 'bbpress_discussion_comments_copied',
'post_type' => 'post',
'post_status' => 'any',
'posts_per_page' => -1
);
$posts = get_posts($args);
if($posts){
foreach ($posts as $post) {
delete_post_meta( $post->ID, 'bbpress_discussion_topic_id');
delete_post_meta( $post->ID, 'bbpress_discussion_comments_copied');
$comments = get_comments( array( 'post_id' => $post->ID, 'order' => 'ASC' ) );
if($comments){
foreach ($comments as $comment) {
delete_comment_meta( $comment->comment_ID, 'bbppt_imported');
}
}
}
}
}
add_action( 'admin_init', 'bbppt_reset_topics_for_posts_meta_fix' );
}
Wow…Thanks for these code.
I tested it on my test site with newmag wordpress theme by tagdiv and it worked.
But on the main site, I’m using Jnews Child theme. I tried it, but it did not work. Perhaps it because I don’t know which function.php to use; main theme or child theme funtion. Tried with child theme, but it did not work.