Replies
Ok I see the issue, THANK YOU SO MUCH FOR YOUR HELP AND PATIENCE!!! I really appreciate it!!
Ok I see the issue, THANK YOU SO MUCH FOR YOUR HELP AND PATIENCE!!!
Yes, when I click on a user Im connected with it goes to 404 page, even though the url populates as https://youryous.com/members/username/.
With the first code provided
/** * Modify default tab. */ function buddydev_modify_default_tab() { if ( ! is_user_logged_in() || bp_is_my_profile() || ! bp_is_active( 'friends' ) ) { return; } // If both are friends set default tab to profile otherwise activity. if ( friends_check_friendship( bp_loggedin_user_id(), bp_displayed_user_id() ) ) { define( 'BP_DEFAULT_COMPONENT', 'survey' ); } else { define( 'BP_DEFAULT_COMPONENT', ‘profile’ ); } } add_action( 'bp_setup_globals', 'buddydev_modify_default_tab', 15 );
It directed to profile correctly but I want it to direct to a specific tab on their profile.
Hello, when I use the code as provided and go to the profile of someone I am connected with, I get a 404 error.
I still cant seem to get this to work. Should I be replacing
$tab
with something else? here is what I pasted in php file.`/**
* Modify default tab.
*/
function buddydev_modify_default_tab( $tab ) {if ( ! is_user_logged_in() || bp_is_my_profile() || ! bp_is_active( ‘friends’ ) ) {
return $tab;
}// If both are friends set default tab to profile otherwise activity.
if ( friends_check_friendship( bp_loggedin_user_id(), bp_displayed_user_id() ) ) {
return ‘friends’;
}return ‘my-survey’;
}add_filter( ‘bp_member_default_component’, ‘buddydev_modify_default_tab’ );
Sorry for all the confusion, I’m not great at php.
Disregard the msg about the error. Still working on the issue.
Actually that code gave me the following error. Parse error: syntax error, unexpected ‘ ‘ (T_STRING) in /home/customer/www/youryous.com/public_html/wp-content/plugins/bp-custom.php on line 10
Ok, so should this replace the previous code or be in addition to the previous code?