Replies
Hi,
Currently the inspect element is showing as<li class> == $0 < a href=””>xyz
When I edit in inspect element as
<li class = “current”> == $0 < a href=””>xyzThen it works fine. It means it is not picking the $select = ‘class=”current”‘;
Also checked the code in the file bp_xprofile-template.php
‘// Loop through field groups and put a tab-lst together.
for ( $i = 0, $count = count( $groups ); $i < $count; ++$i ) {// Setup the selected class.
$selected = ”;
if ( $group_name == $groups[ $i ]->name ) {
$selected = ‘ class=”current”‘;
}// Skip if group has no fields.
if ( empty( $groups[ $i ]->fields ) ) {
continue;
}// Build the profile field group link.
$link = trailingslashit( bp_displayed_user_domain() . bp_get_profile_slug() . ‘/edit/group/’ . $groups[ $i ]->id );// Add tab to end of tabs array.
$tabs[] = sprintf(
‘<li %1$s>%3$s‘,
$selected,
esc_url( $link ),
esc_html( apply_filters( ‘bp_get_the_profile_group_name’, $groups[ $i ]->name ) )
);
}
‘Thanks for your response. The problem is given below in details.
(1) As I am the user, I logged in.
(2) I want to change my profile.
(3) I am having the following four profile field, which I can edit as (Basic info, Education details, Job details, contact details)
(4) each profile field have some fields, just like form.
(5) Now I clicked on Basic info.
(6) At this time (Basic info) should be of different color, and all other three fields should have the same color, because basic info field is active.
(7) and same as for others (If I clicked on any other profile field, then only that profile field should be of different color than other three fields.Edit your profile
(1) Basic Info (2) Education details (3) Job details (4) Contact details
Enter your basic info
Enter your Full Name …………
Enter Your Date of Birth ……..
Male or Female ………………As this time Basic info is active, so this should be of different color than other three fields.
Please help in this regards
Thank youI added private button with below code:
function filter_message_button_link( $link ) {
$link = wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . ‘/compose/?r=’ . bp_core_get_username( bp_get_member_user_id() ) );
return $link;
}function display_private_message_button() {
if( bp_get_member_user_id() != bp_loggedin_user_id() ) {
bp_send_message_button();
add_filter(‘bp_get_send_private_message_link’, ‘filter_message_button_link’, 1, 1 );
}
}
add_action( ‘bp_directory_members_item’, ‘display_private_message_button’ );