I have inserted this code in bp-custom.php:
<?php
function my_redirect() {
wp_redirect( home_url() );
error_log('Hello log');
exit;
}
add_action( 'bp_groups_posted_update', 'my_redirect' );
?>
Writing is done to the log file, but there is no redirect after a user has posted an update in “Group Activities”. Is there anyone who can help?
I use the latest version of WordPress and BuddyPress.
BuddyPress is the only plugin activated.
WordPress is installed in a subdomain.
My issue still happens with themes Twenty Twenty-One, Twenty Twenty-Two, Twenty Twenty-Three and Twenty Twenty-Four.
I have googled and asked Microsoft Copilot, but without success.
step2web is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.