Change Default Members Profile Landing Tab
-
Dear brother,
According to below guide. Suppose the page will change to “Profile”. But I failed.
Another brother can help?
Wordpress : 4.6.1–zh_TW
-
Can anyone help me?
Many Thanks1. Which version of WordPress are you running?
ANS : WordPress : 4.6.12. Did you install WordPress as a directory or subdomain install?
ANS: as a directory3. If a directory install, is it in root or in a subdirectory?
ANS: in root6. Which version of BP are you running?
2.7.012. Do you have any custom functions in bp-custom.php?
Yes.
define(‘BP_DEFAULT_COMPONENT’, ‘profile’ );13. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in?
2.5.1016. Is your server running Windows, or if Linux; Apache, nginx or something else?
Linux
What doesn’t work ? Provide the code you used and try to explain what you did and where.
Dear Danbp,
I would like to change the Profile page to be the landing page. Suppose it can replace the acitivity page. Theme is using “KLEO” please see my step :
Step 1.
I added below code in wp-config.phpdefine(‘WP_MEMORY_LIMIT’, ‘128M’);
define(“BP_DEFAULT_COMPONENT”,”profile”);Step 2.
Created a file at /wp-content/plugins/bp-custom.php with below code<?php
/* my members landing tab */
define(‘BP_DEFAULT_COMPONENT’, ‘profile’ );
?>My Homepage:
http://www.petsbk.com/Hi,
you shouldn’t define the default component twice.
Remove define from wp-config and use it from within bp-custom. If it doesn’t work, remove it from bp-custom and add it to wp-config.For code consistancy, i recommand that you use single quotes, accordingly to the example given on Codex:
define('BP_DEFAULT_COMPONENT', 'profile' );
The define you use in wp-config use double quotes.Btw. i visited your site and profiles are all opening on the defined “profile” screen. Seems you solved the issue ?
Dear danbp,
First of all, I really many Thanks for your respond.
The issue
1. I deleted the bp-custom.php and then only define in wp-config.php with define(‘BP_DEFAULT_COMPONENT’, ‘profile’ );
it can’t work even i clear the browser cache. (chrome)2. Then I create the file /wp-content/plugins/bp-custom.php
<?php
define(‘BP_DEFAULT_COMPONENT’, ‘profile’ );
?>But it also not well.
Suppose the landing page will like this demo:
http://seventhqueen.com/themes/kleo/members/kleoadmin/that’s means I can’t set below link to be the landing page
http://www.petsbk.com/members/’profile’Regard,
Mr. LaiI guess you don’t understand how it works.
The seventhqueen example you mention show the default landing tab when you visit a profile. This default tab is “activity”.
On your site it is exactly what happens actually:
../members/admin/ -> the defined landing tabOn the demo, default is “activity” and the url is
../members/kleoadmin/ -> the default landing tabThe profile slug is always: /members/USERNAME
The default URL of a profile is always: /members/USERNAME
The default content is profile’s activity which use the default URL/slug
When you navigate inside a profile, from activity to profile to groups, forums or media.
In your case and the actual setting, when you go to activity you will have /members/USERNAME/activity
When you go to profile, you will have /members/USERNAME(defined as default component), when you go to groups, you will see /members/USERNAME/groups and so on.To resume, when you modify the default profile component, in favor of profile view or groups or whatever, you modify only the content showed by default. But this doesn’t modify the default slug which stays the same: /members/USERNAME
In so far, it works like you wanted and i don’t understand what you want now.
Um~ not exactly.
I want to make a social web site like Facebook.
Currently, my default page is set to “Settings” -> Front page displays -> Your last posts. And it is pointing to “activity”. But this is not the profile PAGE.
And define(“BP_DEFAULT_COMPONENT”,”profile”); suppose it will changed to : /members/USERNAME
But now only changed to /members/
Every time I go to the landing page, I need to click my ICON (Profile) and then go to http://www.petsbk.com/members/USERNAME/
What I want to do is.
Please see my description Picture below
http://www.petsbk.com/uploadimg/petspage.jpg
Please correct me if I have any misunderstand.You misunderstood me.
Remove any define’profile’ and it each time you visit a profile the default activity screen will show up.
But this may not work in your configuration as anything related to, at least, BuddyPress is going through site/activity/something/. You have to check for this as it is wrong.
Perhaps in Dashboard > settings > general. What is WordPress URL and site URL ? Or have you added activity in a plugin or even in htaccess ?
WordPress Address (URL) and Site Address (URL)
also http://www.petsbk.com.I haven’t change any htaccess.
So, you mean the profile is success.
But just don’t know somehow the landing page does not netvigate to.
http://www.petsbk.com/members/USERNAME/activity/
Seems Setting or the other way wrong config, so you ask me the URL/Site URL.Did you removed
define('BP_DEFAULT_COMPONENT', 'profile' );
?
When it is removed you should have “activity” as default tab.If it still doesn’t work, use
define('BP_DEFAULT_COMPONENT', 'activity' );
Tried both method. But also can’t.
But I changed Settings -> A static page
It’s work.
So it should be override the define default.
If I can set a static page to /member/USERNAME . Then it can fixed. But I don’t know how to do.
Happy Share
I found a plugin then it WORKS!!!
Plug in name
“BP Profile as Homepage”This one?
Doen’t work for me.. Still havn’t found any solution for this issue..
- You must be logged in to reply to this topic.