On my test site – it goes into being draft
If you look at
dashboard>replies>all replies
you should see it as draft in there – I did an approve to get it back.
Can you test that you get the same.
If you are getting that as well, then I’ll take a look to see what the bug is, as agree it should work on the front end.
Hello Robin and thank you for your quick answer 🙏
You are right : replies were converted in draft 👍
ok I’ll take a look when I get a mo
I’ve just taken a look.
bbpress uses the wordpress ‘untrash’ function to restore topics and replies.
That wordpress function includes a note saying
* By default posts that are restored will be assigned a status of 'draft'.
* Prior to WordPress 5.6.0, restored posts were always assigned their original status.
so this was a change in WordPress 5.6
However WordPress helpfully includes a hook we can link to to restore the previous status automatically
add_filter ('wp_untrash_post_status', 'wp_untrash_post_set_previous_status' , 10 , 3) ;
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
Thank you Robin for the filter ! That works great !
I missed that change after the 5.6.0 version.
Best regards
great – glad you are fixed 🙂
Thanks a lot Robin
i had the same problem
i think you should give your fix to the bbpress dev team as this is an annoying bug
Thanks 🙂
it has been repported.
There is a fix in
bbp style pack
once activated go to
dashboard>settings>bbp style pack>bug fixes
and you’ll see the ability to Fix ‘Restore’ on front end