try this in your functions file
function rew_no_reply_per_forum ($reply_address) {
$forum_id = bbp_get_forum_id() ;
if $forum_id = 6 $reply_address = 'xxx@yyy.com' ;
if $forum_id = 7 $reply_address = 'abd@hdhd.com' ;
return $reply_address ;
}
add_filter ('bbp_get_do_not_reply_address', 'rew_no_reply_per_forum') ;
I pasted it in the functions.php file of my child theme and it threw this error message before I could save it:
————————————-
Your PHP code changes were rolled back due to an error on line 271 of file wp-content/themes/kleo-child/functions.php. Please fix and try saving again.
syntax error, unexpected ‘$forum_id’ (T_VARIABLE), expecting ‘(‘
————————————-
Line 271 is:
if $forum_id = 18747 $reply_address = 'mlt-club@monalisa-twins.com' ;
The first item in the list of forums
sorry, untested and taken from my files – try
function rew_no_reply_per_forum ($reply_address) {
$forum_id = bbp_get_forum_id() ;
if ($forum_id == 6 ) $reply_address = 'xxx@yyy.com' ;
if ($forum_id == 7) $reply_address = 'abd@hdhd.com' ;
return $reply_address ;
}
add_filter ('bbp_get_do_not_reply_address', 'rew_no_reply_per_forum') ;
This is it! Small, beautiful and works like a charm.
Thanks
great – glad you are fixed
@robin-w – thank you very much for sharing the “from email” snippet. Works great!
great – glad you are fixed