Set default landing page for buddypress member profile

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.

Topic buddypress Wordpress

Category Web


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

Pages Configuration Settings in Buddypress


Are 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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.