最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Set default landing page for buddypress member profile

programmeradmin3浏览0评论

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
Add a comment  | 

2 Answers 2

Reset to default 0

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.

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

发布评论

评论列表(0)

  1. 暂无评论