在BuddyPress的模板文件中,找到bp-notifications-templatetags.php
文件,然后找到以下代码行:
$slug = bp_get_notification_slug( 'read' );
$url = trailingslashit( $link ) . $slug . '/';
echo '' . esc_html( $text ) . '';
将该代码修改为以下内容:
$url = trailingslashit( $link ) . $notification->id . '/';
echo '' . esc_html( $text ) . '';
这样就可以修复BuddyPress通知列表锚标签URL设置错误的问题。