I've been trying to redirect users to the profile page when accessing profiles of users and self. Currently it's redirecting to activity page by default.
Eg: example/members/username
is showing the activity page as default.
I've tried setting the below line in wp-config.php as suggested in Buddypress forum. But doesn't seem to be working.
define('BP_DEFAULT_COMPONENT', 'profile');
Is there any workaround to implement this, instead of profile all the other links(friends, groups, notifications etc.) are working when setting in BP_DEFAULT_COMPONENT.
I've been trying to redirect users to the profile page when accessing profiles of users and self. Currently it's redirecting to activity page by default.
Eg: example.com/members/username
is showing the activity page as default.
I've tried setting the below line in wp-config.php as suggested in Buddypress forum. But doesn't seem to be working.
define('BP_DEFAULT_COMPONENT', 'profile');
Is there any workaround to implement this, instead of profile all the other links(friends, groups, notifications etc.) are working when setting in BP_DEFAULT_COMPONENT.
Share Improve this question asked Feb 14, 2022 at 19:57 Shyam PrakashShyam Prakash 113 bronze badges 1- That definition works for me. Are you using a theme builder or youzer or some additional plugin re BuddyPress? If so, try deactivating them. – shanebp Commented Feb 14, 2022 at 22:14
2 Answers
Reset to default 0Are you sure you've added the constant definition in the right place? As the BuddyPress codex says:
When adding the code to wp-config.php, place it after define(‘DB_COLLATE’, ”); and before the authentication keys. If you add this line to the bottom of wp-config.php, it will not work.
This got resolved when I set the Activity Streams Page to - None - in Dashboard->Settings->Buddypress->Pages.
I'm not sure what this setting has to do with the default page. Can someone explain about it?
site.com/wp-admin/admin.php?page=bp-page-settings